You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Gordon Sim <gs...@redhat.com> on 2015/03/04 11:00:34 UTC

Re: Issue with request/response pattern / multithread

On 02/25/2015 12:12 PM, Manuel CISSÉ wrote:
> Hello,
>
> I'm using the request / response pattern with qpid 0.16 as described in
> the documentation[1]. I'm using timeouts in the fetch calls.
>
> My problem is that if 2 threads are making requests to the server,
> sometimes (maybe every 10 requests) the fetch call of the client waits
> for the timeout (5 seconds in my code) before returning the response.
>
> This problem does not seem to occur when only 1 thread is making requests.
>
> If I create a new session for receiving each response (when
> USE_LOCAL_SESSION is defined in my code), the problem also does not seem
> to happen.
>
> Is this the normal and expected behavior ?

No. It sounds like https://issues.apache.org/jira/browse/QPID-4786, 
which is now fixed.

> Is it mandatory to create a new session for receiving the response ?

No, but using one thread per session would workaround the bug, e.g. if 
you are unable to upgrade to a newer qpid library.

> Any answer would be appreciated.
>
> You can find my code here :
> client : http://pastebin.com/DXPPy3C6
> server : http://pastebin.com/CM87fA8L
>
> [1]
> https://qpid.apache.org/releases/qpid-0.16/books/Programming-In-Apache-Qpid/html/ch02s12.html
>
>


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


Re: Issue with request/response pattern / multithread

Posted by Manuel CISSÉ <ci...@gmail.com>.
Hello,

Oops, I missed this one when looking for a bug, sorry.

Current qpid in debian is 0.16, so I'm sticking with it for the moment.

Thanks for your answer.

-- 
Regards,
Manuel CISSE

On 04/03/2015 11:00, Gordon Sim wrote:
> On 02/25/2015 12:12 PM, Manuel CISSÉ wrote:
>> Hello,
>>
>> I'm using the request / response pattern with qpid 0.16 as described in
>> the documentation[1]. I'm using timeouts in the fetch calls.
>>
>> My problem is that if 2 threads are making requests to the server,
>> sometimes (maybe every 10 requests) the fetch call of the client waits
>> for the timeout (5 seconds in my code) before returning the response.
>>
>> This problem does not seem to occur when only 1 thread is making
>> requests.
>>
>> If I create a new session for receiving each response (when
>> USE_LOCAL_SESSION is defined in my code), the problem also does not seem
>> to happen.
>>
>> Is this the normal and expected behavior ?
>
> No. It sounds like https://issues.apache.org/jira/browse/QPID-4786,
> which is now fixed.
>
>> Is it mandatory to create a new session for receiving the response ?
>
> No, but using one thread per session would workaround the bug, e.g. if
> you are unable to upgrade to a newer qpid library.
>
>> Any answer would be appreciated.
>>
>> You can find my code here :
>> client : http://pastebin.com/DXPPy3C6
>> server : http://pastebin.com/CM87fA8L
>>
>> [1]
>> https://qpid.apache.org/releases/qpid-0.16/books/Programming-In-Apache-Qpid/html/ch02s12.html
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>