You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Jiri Krutil <ji...@krutil.com> on 2011/06/21 08:56:47 UTC
Synchronization of Session with Sender and Receiver
Hi
I understand an AMQP session may only be used from one thread at a time.
How about Receiver and Sender objects created using a Session? To what
extent are they associated with the parent session?
Is it possible to use a Sender or a Receiver in parallel with the
parent Session from another thread? Or does the access to these
objects have to be synchronized? If yes, which functions require
synchronization?
Thanks
Jiri
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: Synchronization of Session with Sender and Receiver
Posted by Gordon Sim <gs...@redhat.com>.
On 06/21/2011 07:56 AM, Jiri Krutil wrote:
> I understand an AMQP session may only be used from one thread at a time.
An AMQP session is an ordered stream, but really at the level of the
protocol the threading used in any particular implementation is not
relevant.
> How about Receiver and Sender objects created using a Session? To what
> extent are they associated with the parent session?
>
> Is it possible to use a Sender or a Receiver in parallel with the parent
> Session from another thread? Or does the access to these objects have to
> be synchronized? If yes, which functions require synchronization?
On the whole, the messaging API allows for concurrent use of Sessions,
Senders and Receivers. However some things may not make sense, e.g.
concurrently closing a Session while sending over it, so usually
applications will do some coordination between threads accessing these
objects.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org