Re: [axonframework] Preventing of duplicated event handling logic

38 views
Skip to first unread message

Allard Buijze

unread,
Feb 12, 2015, 3:28:31 AM2/12/15
to axonfr...@googlegroups.com
When using the ClusteringEventBus, you provide names to each event handler Cluster. With the AMQP connector, each cluster listens to a queue. When two listeners listen to the same queue, each message is only processed by one of them. You can also set up clusters to connect in 'exclusive mode', which causes only one cluster instance at a time to read from the queue. When it disconnects, the other cluster with the same name (on another host) can take over. 

All this is not important unless you're in a distributed setup. With a 'simple' or local setup, dispatching always happens locally. 

Cheers,

Allard




On Tue, Feb 10, 2015 at 4:42 AM, Alexander Kontsur <alexande...@gmail.com> wrote:

Hello,
please explain me whether there is a solution for the following scenario for the base CQRS use case:
there are an Aggregate, Command and Event - command changed state of the aggregate with the help of the CommandHandler and aggregate fire event to EventHandler, which sends notification email containing information about above change. 
When we have one JVM node with EventHandler everything is OK, but how to prevent second spam email if there will be two nodes with the same EventHandler?

Thank you, Alexander

--
You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axonframewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages