Skip to content
Advertisement

Spring Rabbit MQ listener issues

My Configuration Class is below:-

JavaScript

The DTO is :-

JavaScript

The Snippet for publishing the message is:-

JavaScript

And the snippet to listen the message is:-

JavaScript

The issue is the logs here are not coming up

but if I try with The snippet below then it works:-

JavaScript

it does goes to the logs but how to get the TestDto in that case? If I am doing something wrong in the configuration or not using the listner correctly? Need some resolution on this issue

Advertisement

Answer

Problem solved with issue with the constructor of the POJO class – no default constructor, now the resolution was either to have a default one or have a constructor with @JsonCreator

Example:-

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement