On 10/08/2012 04:25 PM, Nitin Shah wrote:
Hi,
Can someone answer what happens in Qpid C++ implementation version 0.18
when:
1.Having created a receiver and a thread is performing receives for all
receivers created using the getNextReceiver( ) with a timeout and at
some point later, another thread decides to close the receiver via the
receiver.close() call? Can we assume that receiver is permanently removed?
2.If one wanted to add a new receiver at some point later, which is
exactly the same as the originally created receiver using
createReceiver(), is that ok to do? Of course we are assuming that the
nextReceiver() after the create call will return the newly created
receiver when that receiver has any data.
Are these valid assumptions? The documentation does not seem to give me
an answer.
In a nutshell, we are trying to add and remove receivers at will.
That is certainly possible. However without some degree of coordination
between the threads using the receivers and those removing them, you may
get exceptions thrown (e.g. if you are fetching on a receiver as you
close it on another thread). I would advise adding a little locking or
coordination of some form between your threads.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org