core-java icon indicating copy to clipboard operation
core-java copied to clipboard

Current tenant when routing a signal

Open dmdashenkov opened this issue 2 years ago • 0 comments

When routing an event via an EventRoute configured through a repository, the current tenant is not set.

Since the repository is responsible for routing signals, it's natural that the users will want to run queries upon that repository in order to find the target of a signal.

We should either:

  • set the tenant automatically from the signal context;
  • on the API level, ensure the user provides a tenant instead of relying on the CurrentTenant;
  • discourage using protected API of a repository and instead provide an easy way for the user to query a repository from within.

Which option to choose is a matter of discussion.

dmdashenkov avatar Aug 25 '22 14:08 dmdashenkov