amqpcpp
amqpcpp copied to clipboard
How to reject or nack a message?
A client gets a message from server and starts working.If it finishes the work,it can use AMQPQueue.Ack to notify the server.But how to send a fail message to notify the server to distribute the message to other client?
Add this method in AMQPQueue :
void AMQPQueue::Reject(uint32_t delivery_tag, amqp_boolean_t requeue) {
this->delivery_tag=delivery_tag;
amqp_basic_reject_t_ s;
s.delivery_tag = delivery_tag;
s.requeue = requeue;
amqp_send_method(*cnn, channelNum, AMQP_BASIC_REJECT_METHOD, &s);
}
Ok, make pull request.