简体   繁体   中英

rabbitmq basic.ack , on a different channel object

here is the implementation I have

Consume:

GetResponse resp = channel.basicGet(qName, false);

Acknowledge:

channel.basicAck(dTag, false);

or

channel.basicNack(dTag, false,true);

The problem I am facing that is, if I create different channel objects, the acknowledge is not happening. And I can only implement that if I am doing both ( consume, acknowledge ) from same jvm( tomcat or any other app server ).

so if my application is running in a clustered mode( multiple application server ) , I am in trouble .

Can anyone please help me how can I acknowledge from a different machine the message was consumed, ie using a different channelobject .

Thanks !!

Can anyone please help me how can I acknowledge from a different machine the message was consumed, ie using a different channelobject .

you can't.

acknowledgement must happen on the same channel.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM