How do we make sure we process events exactly once? If eventstore server crashes before checkpoint is written, there is a possibility duplicate events may be sent. Is it the responsibility of the subscriber(s) to handle this?
How to enforce ordering (precedence requirement)? Say we have a publisher which writes two events- Event A and Event B and we have two subscribers. How to make sure Event B is processed only after Event A is processed. Should this be handled by the subscribers or is there some other way the event store can help?
Also one related to projections
Say we create a projection A and then we create a new projection B, how do we make sure projection B only contains events that have not been acknowledged?
1. How do we make sure we process events exactly once? If eventstore server
crashes before checkpoint is written, there is a possibility duplicate
events may be sent. Is it the responsibility of the subscriber(s) to handle
this?
You buy a magic bean and climb the bean stalk. exactly-once messaging
doesn't exist. You can simulate it varying ways but it doesn't exist
2. How to enforce ordering (precedence requirement)? Say we have a publisher
which writes two events- Event A and Event B and we have two subscribers.
How to make sure Event B is processed only after Event A is processed.
Should this be handled by the subscribers or is there some other way the
event store can help?
You cant unless your consumers are interacting with each other for
obvious reasons (how long is the network path to each?). What you can
do is as example make sure all messages from the same stream go to the
same consumer. See pinned strategy.
Also one related to projections
Say we create a projection A and then we create a new projection B, how do
we make sure projection B only contains events that have not been
acknowledged?
Say we create a projection A and then we create a new projection B, how do
we make sure projection B only contains events that have not been
acknowledged?
I have no idea what you are asking
Say, you have projection A which links Event A from Stream A to stream B. Subscriber receives it, processes and sends ack. Now, I create a new projection B. How do I filter out all existing Events (e.g. Event A) from Stream A for which ack has been received and link the remaining events to Stream C?