qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: no message with nextReceiver
Date Mon, 13 Apr 2015 11:13:40 GMT
On 04/13/2015 08:44 AM, AlexandreLambin wrote:
> Hello,
>
> I'm trying to use the nextReceiver but it didn't work, my app doesn't
> receive any messages.
> So I modified the drain.cpp file to use nextReceiver on the session but I
> don't received any message in this case also. I use the latest version 0.32
> under linux.
>
> Is there a reason?
>
> I create an exchange with the line:
>> qpid-config add exchange topic haha
>
> With the regular "drain" apps, I receive the message sent by "spout":
>> ./drain -f haha/TEST.ORDERS
>> ./spout haha/TEST.ORDERS
>
> The "drain" apps which use nextReceiver doesn't receive the message sent by
> "spout":
>> ./drain_with_nextReceiver -f haha/TEST.ORDERS
>> ./spout haha/TEST.ORDERS
>
> Here the line I modified,
>   > diff drain.cpp drain_with_nextReceiver.cpp
> 96c96
> <             while (receiver.fetch(message, timeout)) {
> ---
>>              while (session.nextReceiver(timeout).fetch(message)) {

You need to set a capacity of at least 1 on each receiver. This is what 
allows the broker to send messages before any explicit fetch() call.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message