Issues reading events from RabbitMQ queue on Axon 4.0

Using Axon 4.0 and AMQP 4.0.M2 with spring boot 2.x. I am trying to read events from an AMQP queue.

`

@Slf4j
@Configuration
public class RabbitConfig {

    @Bean
    public SpringAMQPMessageSource myQueueMessageSource(Serializer serializer) {
        return new SpringAMQPMessageSource(serializer) {

            @RabbitListener(queues = "myEventQueue")
            @Override
            public void onMessage(Message message, Channel channel) {
                log.debug("Event Received: {}");

                log.debug("Event Received: {}", message);
                super.onMessage(message, channel);
            }
        };
    }
}

`

application.properties

`

server.port=8079

spring.h2.console.enabled=true

axon.eventhandling.processors.name.source=myQueueMessageSource

`


I debugged the onMessage method and when a new message comes in, the eventProcessors list is always empty, so the message isn't processed by my application.

What am I missing out?

Did you assign any handlers to the processor called “name” ?

i think no, but i don’t undesrstend how to do this, can you show me some example and explenation why should i do this?
thx.

The “name” part of the configuration is the name of the Event Processor you want to configure. You can assign handlers to a processor with the @ProcessingGroup annotation (specify “name” as parameter).
For details, check the reference guide:
https://docs.axoniq.io/reference-guide/1.3-infrastructure-components/event-processing#event-processors

Cheers,

Allard

yep thank you, it’s work