Using rabbitMQ with Micronaut latest version. On consumer both the parameter accepts the same value from the producer, however, I am sending the different value from the producer.
Output of consumer, since the value for categoryId
and id
are same
On the producer side I am sending the different value as below
@RabbitProperty(name = "replyTo", value = "amq.rabbitmq.reply-to")
@Binding(ConstantValues.COUNT_SUB_CATEGORY)
Maybe<Long> Count(@MessageHeader String categoryId, String id);
The categoryId
and id
have a different value in the producer side
What is the mistake I am doing quite not sure about it.
It's strange. I replicated this issue on my system too. And, this issue seems to go away when deprecated
io.micronaut.messaging.annotation.Header
is used.Can you try that on your code too and see if it works ?
Your new code:
Producer:
Consumer:
Tested using micronaut version 2.5.1, micronaut-rabbitmq 2.5.0, java 11