BasicNack frame makes the consumer stop (dont know why) so we use the BackReject message instead when there is no need to reject multiple messages
This commit is contained in:
parent
ca8a39ea45
commit
3a700226c8
|
|
@ -36,6 +36,7 @@
|
||||||
#include "basicackframe.h"
|
#include "basicackframe.h"
|
||||||
#include "basicnackframe.h"
|
#include "basicnackframe.h"
|
||||||
#include "basicrecoverframe.h"
|
#include "basicrecoverframe.h"
|
||||||
|
#include "basicrejectframe.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set up namespace
|
* Set up namespace
|
||||||
|
|
@ -555,8 +556,17 @@ bool ChannelImpl::ack(uint64_t deliveryTag, int flags)
|
||||||
*/
|
*/
|
||||||
bool ChannelImpl::reject(uint64_t deliveryTag, int flags)
|
bool ChannelImpl::reject(uint64_t deliveryTag, int flags)
|
||||||
{
|
{
|
||||||
// send a nack frame
|
// should we reject multiple messages?
|
||||||
return send(BasicNackFrame(_id, deliveryTag, flags & multiple, flags & requeue));
|
if (flags & multiple)
|
||||||
|
{
|
||||||
|
// send a nack frame
|
||||||
|
return send(BasicNackFrame(_id, deliveryTag, true, flags & requeue));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// send a reject frame
|
||||||
|
return send(BasicRejectFrame(_id, deliveryTag, flags & requeue));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue