Is there a way to keep JMS WebSocket connections open (e.g., enable
ping/pong heartbeats)?
I get the following error:
javax.jms.JMSException: Transport connection remotely closed.
at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(
JmsExceptionSupport.java:86)
at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(
JmsExceptionSupport.java:108)
at org.apache.qpid.jms.JmsConnection.onAsyncException(
JmsConnection.java:1385)
at org.apache.qpid.jms.JmsConnection.onProviderException(
JmsConnection.java:1369)
at org.apache.qpid.jms.JmsConnection.onConnectionFailure(
JmsConnection.java:1237)
at org.apache.qpid.jms.provider.amqp.AmqpProvider.fireProviderException(
AmqpProvider.java:1015)
at org.apache.qpid.jms.provider.amqp.AmqpProvider$20.run(
AmqpProvider.java:830)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(
ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(
ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(
ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(
ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Transport connection remotely closed.
... 8 more
With a relatively simple client program:
Context context = new InitialContext();
ConnectionFactory factory = (ConnectionFactory) context.lookup(
"myFactoryLookup");
Destination queue = (Destination) context.lookup("myQueueLookup"
);
Connection connection = factory.createConnection("admin",
"admin");
connection.setExceptionListener(new MyExceptionListener());
// connection.start();
Session session = connection.createSession(false, Session.
AUTO_ACKNOWLEDGE);
session.createProducer(queue);
Thread.sleep(360000);
jndi properties:
java.naming.factory.initial =
org.apache.qpid.jms.jndi.JmsInitialContextFactory
connectionfactory.myFactoryLookup = amqpws://localhost
:5000?amqp.vhost=default&amqp.idleTimeout=3600000
queue.myQueueLookup = Q1
Server version: qpid - 6.1.1 build: 1775107 (AMQP version(s) [major.minor]:
0-8, 0-9, 0-9-1, 0-10, 1.0)
Client version: qpid-jms-client-0.20.0 with proton-j-0.16.0
Thanks,
Ben