qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: Multi-Threading
Date Wed, 01 Dec 2010 12:47:15 GMT
On 11/26/2010 10:43 AM, gcutuli wrote:
> Dear all,
> I'm moving toward the implementation of a multithreading application based
> on QPID Messaging 0.7, and I experienced strange behaviors.
> This is the background:
> - subscription of N subjects with N different receivers (all of them under
> the same session)
> - running N different "diaspatching threads" for each receiver
> Basically, each "dispatcher" executes an infinite loop where messages are
> fetched from the related queue:
> for (;;)
> {
>      msg = receiver.fetch(Duration::Forever);
> }
> After a random number of incoming messages, the library crashes (exactly on
> the "fetch" method) with one of the following exceptions:
> qpid::messaging::NoMessageAvailable or  qpid::messaging::SessionError

Is there any more detail logged for the session errors, either on the 
client or the broker? I suspect that may be the root cause of the issue.

> My suspect is that the native qpid session object is not designed to be used
> in a multi-threading scenario (in other words this object is not
> thread-safe).

It is supposed to be threadsafe (that doesn't of course rule out a bug 
making it unsafe).

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

View raw message