You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Chris Richardson (JIRA)" <ji...@apache.org> on 2015/12/15 19:34:46 UTC

[jira] [Created] (QPIDJMS-141) Thread sync error can cause long blocking delay after message send

Chris Richardson created QPIDJMS-141:
----------------------------------------

             Summary: Thread sync error can cause long blocking delay after message send
                 Key: QPIDJMS-141
                 URL: https://issues.apache.org/jira/browse/QPIDJMS-141
             Project: Qpid JMS
          Issue Type: Bug
          Components: qpid-jms-client
    Affects Versions: 0.6.0
            Reporter: Chris Richardson
             Fix For: 0.7.0


There is a discontinuity in the thread synchronisation between the JmsConnection and AmqpProvider classes when sending a message: the JmsConnection class awaits a signal after requesting message transmission (line 615, "request.sync();") while the AmqpProvider does not send the expected signal (lines 486/487,
if (couldSend && envelope.isSendAsync()) {
                        request.onSuccess();
)

This results in a ~1000ms blocking delay while the request.sync() times out.

This only happens in a scenario where the JmsSession determines that the message should be sent synchronously (lines 668/669: 
boolean sync = connection.isAlwaysSyncSend() ||
                           (!connection.isForceAsyncSend() && deliveryMode == DeliveryMode.PERSISTENT && !getTransacted());
).

One workaround for this is to set the MessageProducer deliveryMode to DeliveryMode.NON_PERSISTENT, causing the JmsSession to evaluate the send operation to be asynchronous and so the AmqpProvider signals the request as expected by the JmsConnection. However this may have other side-effects...




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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