How to change session timeout in qpid Java client?
Environment
- Red Hat Enterprise MRG Messaging
- qpid Java client
Issue
Using qpid Java client:
- some producers blocked by producer flow control and they are timeouted after minute timeout
- some other scenario leading to
session.sync()
method being called internally in the qpid Java client library, that timeouts after one minute
Is that timeout configurable?
Resolution
The timeout can be changed by either of JVM options:
-Damqj.default_syncwrite_timeout=<milliseconds>
-Dqpid.sync_op_timeout=<milliseconds>
If both options are present, -Dqpid.sync_op_timeout
is used.
Diagnostic Steps
When the timeout expires, the client logs:
org.apache.qpid.AMQException: timed out waiting for sync: complete = 1, point = 2 [error code 541: internal error]
at org.apache.qpid.client.AMQSession_0_10.setCurrentException(AMQSession_0_10.java:1070)
at org.apache.qpid.client.AMQSession_0_10.sendClose(AMQSession_0_10.java:431)
at org.apache.qpid.client.AMQSession.close(AMQSession.java:714)
at org.apache.qpid.client.AMQSession.close(AMQSession.java:682)
at org.apache.qpid.client.AMQSession.close(AMQSession.java:534)
...
2013-10-21 13:48:49 +0200 [main] INFO org.apache.qpid.client.AMQConnection - Not a hard-error connection not closing: org.apache.qpid.AMQException: timed out waiting for sync: complete = 1, point = 2 [error code 541: internal error]
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments