I tried configuring as mentioned in the link you shared, it still does not handle event from @SagaEventHandler but does so from @EventyHandler, below is my configuration class
`
@Configuration
public class AxonConfiguration {
private final static Logger logger = LoggerFactory.getLogger(AxonConfiguration.class);
@Value("${axon.amqp.exchange}")
private String exchange;
@Bean
public Exchange exchange() {
logger.info(exchange + " AMQP Exchange Registering ");
return ExchangeBuilder.fanoutExchange(exchange).build();
}
@Bean
public Queue queue() {
return QueueBuilder.durable(exchange).build();
}
@Bean
public Binding binding() {
return BindingBuilder.bind(queue()).to(exchange()).with("*").noargs();
}
@Autowired
public void configure(AmqpAdmin amqpAdmin) {
amqpAdmin.declareExchange(exchange());
amqpAdmin.declareQueue(queue());
amqpAdmin.declareBinding(binding());
}
@Bean
public SagaConfiguration userProfileSagaConfiguration(Serializer serializer) {
return SagaConfiguration.subscribingSagaManager(UserProfileSaga.class);
// return
// SagaConfiguration.subscribingSagaManager(UserProfileSaga.class, c ->
// testdemo(serializer));
}
@Bean
public SpringAMQPMessageSource testdemo(Serializer serializer) {
return new SpringAMQPMessageSource(serializer) {
@Transactional
@RabbitListener(queues = “testdemo”)
@Override
public void onMessage(Message message, Channel channel) throws Exception {
System.out.println("\n\n" + message.getMessageProperties() + “\n\n”);
System.out.println("\n\nchannel == " + channel + “\n\n”);
System.out.println(new String(message.getBody()));
System.out.println(channel);
super.onMessage(message, channel);
}
};
}
// public void configure(EventHandlingConfiguration ehConfig, SpringAMQPMessageSource testdemo) {
// ehConfig.registerSubscribingEventProcessor(“myProcessor”, c -> testdemo);
// }
}
`
Thanks,
Malay