1
votes

I am using amqp-consumer from linux and publishing messages from Java Spring project. I can receive the messages at linux amqp-consumer, but I wonder to know how to acknowledge this messages are receive and also send back a responde. Is taht possible?

I already use -A option at amqp-consumer but with out success.

amqp-consume -s 127.0.0.1:5672 -q myqueue -e "amq.topic" --vhost "/" -r "worker1" --username=guest --password=guest -d /bin/bash /home/felipe/Test/onmessage.sh

received message from Java
1

1 Answers

3
votes

According to the man page; the amqp-consume will acknowledge the message for you...

By default, messages will be consumed with explicit acknowledgements.

-A turns off acks - and the broker will auto-ack the message.

It doesn't look like it supports sending a reply; you'd have to write a script to call amqp-publish.

It looks like a pretty basic tool, however; I don't see a way to get the replyTo header from the request message.