JMSException InterruptedIOException - producer thread is interrupted

I get a JMS Exception and it seems that the queue does not exit or does not finish the task.

Messages are asynchronous and work fine, but sometimes get below the exception. It seems that the listener continues to listen on the other hand, but on the manufacturer’s side this is an exception.

javax.jms.JMSException: java.io.InterruptedIOException at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62) at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1266) at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1350) at org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:495) at com.vtech.mqservice.response.SendResponse.sendResponseToQueue(SendResponse.java:44) Caused by: java.io.InterruptedIOException at org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:102) at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40) at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:74) at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:79) at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1244) ... 0 more 

Please help me determine what causes the producer thread to interrupt.

I am updating activemq to the latest version and updating the results.

Please point me in the right direction?

Update: The ActiveMQ version used is activeemq-all-5.3.0.jar

+6
source share
2 answers

I googled your exception did not get an exact answer, but then I looked at the source code for WireFormatNegotiator ActiveMQ.

Here you can find http://alvinalexander.com/java/jwarehouse/activemq/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java.shtml

 public void oneway(Object command) throws IOException { try { if (!readyCountDownLatch.await(negotiateTimeout, TimeUnit.MILLISECONDS)) { throw new IOException("Wire format negotiation timeout: peer did not send his wire format."); } } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new InterruptedIOException(); } super.oneway(command); } 

I think your problem is somehow related to "negotiateTimeout". Perhaps you should set a certain amount of timeout or delete it if you put it earlier.

+1
source

I got the same exception and realized that the JVM MaxPermSize is low. I increased the size to 1024 MB and it worked.

0
source

All Articles