I have publisher that has SQL Server persistence. It has a couple subscribers.
My deployment has the following basic steps:
- Deploy the publisher. The publisher starts.
- Restart the subscribers. The publisher receives the subscription messages.
- The publisher publishes events to the broker and the subscribers receive events and do their thing.
However there is a gap between step 1 and 2. After the publisher is started, it starts to process messages. Any events published before the subscribers are restarted will be lost because they are not registered as subscribers yet, right?
How can I prevent this from happening? If my understanding of how the publisher-subscriber work is incorrect, please let me know.