Axon Event Bus with JMS as persistent Queue

219 views
Skip to first unread message

Jebuselwyn Martin

unread,
Jul 27, 2016, 11:22:06 PM7/27/16
to Axon Framework Users

Is there an option to use AxonFramework's EventBus capability (pub-sub) for Domain Events without AMQP (but with persistent queues backed by JMS provider)? What are the additional development required to use this or are these provided for out-of-box?

From Sender end:
- EventBus Autowired to message producers
- producers using eventBus.publish() to publish domain-events
- Equivalent config to link EventBus to Queue/Topic in JMS?

From Subscriber end:

- EventHandlers annotated with @EventHandler
- Selectors wired to Cluster
- Equivalent config to link Cluster to Queue in JMS ??


Thanks,
Jebu.

Allard Buijze

unread,
Jul 29, 2016, 6:45:55 AM7/29/16
to Axon Framework Users
Hi Jebu,

basically, you'll need to implement the EventBusTerminal to do this. It forms the bridge between the sending side of the Event Bus and the clusters receiving the events.

In the onClusterCreated method, you'll want to create a JMS consumer that starts consuming messages and forwards them to the cluster provided in the method call. The publish method simply publishes the message to the relevant JMS queues and topics.

You can use the SpringAMQPTerminal as an example. It creates a MessageListenerContainer for each Cluster registered with the Terminal.

Hope this helps.
Cheers,

Allard Buijze



--
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