eventuous icon indicating copy to clipboard operation
eventuous copied to clipboard

Possibly generate server-side filter using handled event types

Open alexeyzimarev opened this issue 3 years ago • 0 comments

The AllStreamSubscriptionService accepts the filter, so it's possible to limit the number of events delivered. It works fine, but it must be explicitly configured.

As we don't really know what events the subscription wants to process, we can't pre-configure the filter automatically.

It should be possible to make a new version of subscriptions, which would only use TypedEventHandler. This way, the subscription knows what events it needs, and build the filter automatically.

It can also be done by checking the list of event handlers provided to the subscription, and if all of them are typed handlers, we can build the filter automatically.

ESDB subscription to $all could use a server-side filter. RMQ subscription could use the routing key, as the event type is already used as the routing key in the RMQ producer.

alexeyzimarev avatar Apr 23 '21 08:04 alexeyzimarev