Using Axon with Spark

Has there been much investigation into using Axon with Spark?

We would like to do some of our projections in Spark, so I’ve been digging into Axon Framework code, and I’m seeing some promise around “Subscribing Event Processors,” but it also seems more complicated than that.

I’m curious if there’s been any thought in this area already, or if anyone would have pointers or advice as I look into this approach.


Derek Moore

Hi Derek,

what exactly would you like to do? Send Axon messages out of Axon’s context into some msg source from which Spark picks them up? Or would you like to connect the Spark side of things to Axon?
In the former case, have a look at the SpringAMQPPublisher in the extension-amqp module.
For the former, you’d probably want to hook a bit more directly into Axon’s MessageSources. They come in two shapes: SubscribableMessageSource (which bring the messages to you in their thread) or StreamableMessageSource, where you are in control.
The easiest is to just define an @EventHandler that uses EventMessage as first prameter. This will give you all the event messages, including meta data.