Merge branch 'master' of github.com:CopernicaMarketingSoftware/AMQP-CPP

This commit is contained in:
Martijn Otto 2014-07-31 10:17:15 +02:00
commit f2f241665f
4 changed files with 13 additions and 6 deletions

View File

@ -331,11 +331,12 @@ public:
* the prefetchCount
*
* @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.
*/
Deferred &setQos(uint16_t prefetchCount)
Deferred &setQos(uint16_t prefetchCount, bool global = false)
{
return _implementation.setQos(prefetchCount);
return _implementation.setQos(prefetchCount, global);
}
/**

View File

@ -344,8 +344,11 @@ public:
*
* This function returns a deferred handler. Callbacks can be installed
* 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

View File

@ -55,7 +55,7 @@ public:
*
* @param channel channel we're working on
* @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
*/
BasicQosFrame(uint16_t channel, int16_t prefetchCount = 0, bool global = false) :

View File

@ -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
* 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
return push(BasicQosFrame(_id, prefetchCount, false));
return push(BasicQosFrame(_id, prefetchCount, global));
}
/**