Quality of service now supports "global" parameter (default is still false)
This commit is contained in:
parent
ba3b8ecf0f
commit
f905c9db49
|
|
@ -331,11 +331,12 @@ public:
|
||||||
* the prefetchCount
|
* the prefetchCount
|
||||||
*
|
*
|
||||||
* @param prefetchCount maximum number of messages to prefetch
|
* @param prefetchCount maximum number of messages to prefetch
|
||||||
|
* @param global share counter between all consumers on the same channel
|
||||||
* @return bool whether the Qos frame is sent.
|
* @return bool whether the Qos frame is sent.
|
||||||
*/
|
*/
|
||||||
Deferred &setQos(uint16_t prefetchCount)
|
Deferred &setQos(uint16_t prefetchCount, bool global = false)
|
||||||
{
|
{
|
||||||
return _implementation.setQos(prefetchCount);
|
return _implementation.setQos(prefetchCount, global);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -344,8 +344,11 @@ public:
|
||||||
*
|
*
|
||||||
* This function returns a deferred handler. Callbacks can be installed
|
* This function returns a deferred handler. Callbacks can be installed
|
||||||
* using onSuccess(), onError() and onFinalize() methods.
|
* using onSuccess(), onError() and onFinalize() methods.
|
||||||
|
*
|
||||||
|
* @param count number of messages to pre-fetch
|
||||||
|
* @param global share count between all consumers on the same channel
|
||||||
*/
|
*/
|
||||||
Deferred &setQos(uint16_t prefetchCount);
|
Deferred &setQos(uint16_t prefetchCount, bool global = false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tell the RabbitMQ server that we're ready to consume messages
|
* Tell the RabbitMQ server that we're ready to consume messages
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ public:
|
||||||
*
|
*
|
||||||
* @param channel channel we're working on
|
* @param channel channel we're working on
|
||||||
* @param prefetchCount specifies a prefetch window in terms of whole messages
|
* @param prefetchCount specifies a prefetch window in terms of whole messages
|
||||||
* @param global apply QoS settings to entire connection
|
* @param global share prefetch count with all consumers on the same channel
|
||||||
* @default false
|
* @default false
|
||||||
*/
|
*/
|
||||||
BasicQosFrame(uint16_t channel, int16_t prefetchCount = 0, bool global = false) :
|
BasicQosFrame(uint16_t channel, int16_t prefetchCount = 0, bool global = false) :
|
||||||
|
|
|
||||||
|
|
@ -462,11 +462,14 @@ bool ChannelImpl::publish(const std::string &exchange, const std::string &routin
|
||||||
*
|
*
|
||||||
* This function returns a deferred handler. Callbacks can be installed
|
* This function returns a deferred handler. Callbacks can be installed
|
||||||
* using onSuccess(), onError() and onFinalize() methods.
|
* using onSuccess(), onError() and onFinalize() methods.
|
||||||
|
*
|
||||||
|
* @param prefetchCount number of messages to fetch
|
||||||
|
* @param global share counter between all consumers on the same channel
|
||||||
*/
|
*/
|
||||||
Deferred &ChannelImpl::setQos(uint16_t prefetchCount)
|
Deferred &ChannelImpl::setQos(uint16_t prefetchCount, bool global)
|
||||||
{
|
{
|
||||||
// send a qos frame
|
// send a qos frame
|
||||||
return push(BasicQosFrame(_id, prefetchCount, false));
|
return push(BasicQosFrame(_id, prefetchCount, global));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue