Want advise on Catch-up subscription - Currently we are using catch-up subscription to subscribe to all events, the event store client API has a function called “SubscribeToAllFrom”, that will trigger the subscriber function (EventStoreOnEventCatchup in this example), and process the event.
client.Connection.SubscribeToAllFrom(
_indexPosition,
settings,
(sub, evt) =>
ReceiveHandler(sub, evt),
null,
(sub, reason, ex) =>
SubscriptionDroppedHandler(sub, reason, ex),
credentials)
Issues
I have multiple instances calling above function, that means those multiple instance receive same event independently, causing us to process same event multiple times.
Question
- Is there any way to configure Catch-up subscription in such way, each event will only go to one subscriber only, instead of all of them?
- If the answer to question 1 is NO, can the persistent subscription solve this problem? The document says that persistent subscription uses competitive consumer pattern. Does it mean once an event is picked by one subscriber, it will not be sent to other subscribers?