I was just wondering if there is any limit to the amount of persistent subscription you can have active?
The reason I am asking Is I am considering setting up one subscription per message instead of having one persistent subscription for all messages and then dispatching the messages to correct handler with in the application.
With having one subscription per message I can have different settings for different message types.
Is there a maximum amount of subscription I can have active?
Is it a bad idea to have many subscriptions active?
Thanks for any advice I can get!
there is no hard limit at the DB level , maybe at the connection level .
though keep in mind that this will impact the server that will need to handle checkpoints , timouts , retries, parked message for every single
I would suggest you test it out if the number of events type is low that could work.
also worth , if it’s single types you’re looking at : subscribe to the event type streams : https://developers.eventstore.com/server/v22.10/projections.html#by-event-type
I find persistent subscription only useful when combining it with a broker.
that makes sense thank you for your answer!
I thought I could get away with using eventstoredb for handling messages, I am using a broker for publishing external messages but internally I’m only using subscriptions. Can you elaborate on how I would combine persistent subscription with a broker?
You can avoid the broker but then your question arises about how many persistent subscriptions you can have ESDB wasn’t designed to be used as a broker, although it’s possible on a relatively small scale.
Can you elaborate on how I would combine persistent subscription with a broker?
Create a subscription that would consume events from ESDB, potentially filter and transform them, then publish to the broker.
Thank you for your help! using a broker sounds like a good solution for me