qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: Publish-Subscribe queue question
Date Thu, 28 Oct 2010 08:48:43 GMT
On 10/28/2010 09:44 AM, zhaoyi0113@gmail.com wrote:
> I am using the example code examples/pub-sub/topic_listener.cpp. In this
> code, it declares queue by adding a session id so different sessions will
> have different queue names. If you change the code to use the same queue
> name for different sessions, you will get the problem. The code looks
> basically like below:
>
>
> session.queueDeclare(arg::queue = queue_name, arg::exclusive = false,
>                          arg::autoDelete = true, arg::durable = false);
> session.exchangeBind(arg::exchange = exchange,
>                          arg::queue = queue_name, arg::bindingKey = binding);
> session.exchangeBind(arg::exchange = exchange,
>                          arg::queue = queue_name, arg::bindingKey =
> "control");
> subscriptionsMgr = new SubscriptionManager(
>                                  session);

try changing:

> subscriptionsMgr->subscribe(listener, queue_name);

to:

subscriptionsMgr->subscribe(listener, queue_name, 
SubscriptionSettings(FlowControl::messageWindow(1)));

Does that address the issue you are seeing?


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Mime
View raw message