You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by AlexandreLambin <al...@gmail.com> on 2015/04/13 09:44:30 UTC
no message with nextReceiver
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)) {
Regards,
Alex.
--
View this message in context: http://qpid.2158936.n2.nabble.com/no-message-with-nextReceiver-tp7622850.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org
Re: no message with nextReceiver
Posted by AlexandreLambin <al...@gmail.com>.
Thanks, now it's working perfectly.
--
View this message in context: http://qpid.2158936.n2.nabble.com/no-message-with-nextReceiver-tp7622850p7622885.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org
Re: no message with nextReceiver
Posted by Gordon Sim <gs...@redhat.com>.
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