AMQP extension example how to implemented

Hi Guys,

I try to test the integration of amqp extension with Axon framework. I found the doc here : but i need to have more explication about how we configure the connection with AMQP and Axon Framework.

We got some example of code of how we can implemented ?

Also i got this error message : Error processing condition on org.axonframework.extensions.amqp.autoconfig.AMQPAutoConfiguration.amqpMessageConverter

Many thanks,


Hi @Dominic_Dubreuil,

We don’t provide a direct example, like we currently have for the Spring Cloud and Kafka Extension. What I can link you to is a piece of code which we used during our training material, which is an exert of an AMQP configuration class:

public class AmqpConfig {

    public SpringAMQPMessageSource springAMQPMessageSource(Serializer serializer) {
        return new SpringAMQPMessageSource(serializer) {
            @RabbitListener(queues = "events")
            public void onMessage(Message message, Channel channel) {
                super.onMessage(message, channel);

    public Exchange eventsExchange() {
        return ExchangeBuilder.topicExchange("events").build();

    public Queue eventsQueue() {
        return QueueBuilder.durable("events").build();

    public Binding eventsBinding() {
        return BindingBuilder.bind(eventsQueue()).to(eventsExchange()).with("#").noargs();

    public void config(AmqpAdmin admin, EventProcessingConfigurer epConfig, SpringAMQPMessageSource messageSource) {

        epConfig.registerSubscribingEventProcessor("rabbit-events", c -> messageSource);

What you see in this AmqpConfig class, is the creation of a message source, the required RabbitMQ exchange, queue and binding beans, and configuring the SpringAMQPMessageSource as the source for a SubscribingEventProcessor. Note that this configuration further assume the use of the axon-amqp-spring-boot-starter dependency, as that will give you the required converter (to convert events to publishable messages on AMQP) and event publisher (used to actually publish events on a queue).

Hoping this will help you out further @Dominic_Dubreuil!