core-java
core-java copied to clipboard
Current tenant when routing a signal
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.