Axon Event Bus with JMS as persistent Queue

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.

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