[
https://issues.apache.org/jira/browse/QPIDJMS-376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16432248#comment-16432248
]
Daniel Maier commented on QPIDJMS-376:
--------------------------------------
Ok, I will investigate why the server behaves this way.
What do you mean with "use the consumer" exactly? This is the code I am using:
{code:java}
public static void main(String[] args) throws NamingException, JMSException,
InterruptedException {
final Hashtable<Object, Object> env = new Hashtable<>();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.qpid.jms.jndi.JmsInitialContextFactory");
env.put("connectionfactory." + "cfid",
"failover:(amqps://192.168.99.100:30071?amqp.saslMechanisms=PLAIN&transport.trustAll=true&"
+
"transport.verifyHost=false&amqp.traceFrames=true)?jms.username=perf_test_tenant&jms.password=secret&"
+
"initialReconnectDelay=10s&reconnectDelay=1s&maxReconnectDelay=1h&useReconnectBackOff=true&reconnectBackOffMultiplier=1m");
final Context ctx = new InitialContext(env);
final ConnectionFactory cf = (ConnectionFactory) ctx.lookup("cfid");
final Connection connection = cf.createConnection();
connection.setExceptionListener(jmsException ->
System.err.println(jmsException));
connection.setClientID("cfid");
connection.start();
MessageConsumer consumer = connection.createSession().createConsumer(new
JmsQueue("telemetry/PERF_TEST_TENANT"));
consumer.setMessageListener(message -> System.out.println(message));
Thread.currentThread().join();
}
{code}
I get no exception anywhere.
Additionally: What is the expected behavior if the server closes the link after
the link was established before? There is no way my client gets notified about
that when I am using message listener?
> Qpid JMS client does not notify user nor retries link establishment after
> server closes receiver link
> -----------------------------------------------------------------------------------------------------
>
> Key: QPIDJMS-376
> URL: https://issues.apache.org/jira/browse/QPIDJMS-376
> Project: Qpid JMS
> Issue Type: Bug
> Components: qpid-jms-client
> Affects Versions: 0.31.0
> Environment: AMQP Server: Enmasse 0.17.1
> Enmasse Address Type: anycast
> Reporter: Daniel Maier
> Priority: Major
> Attachments: clientlogs.txt
>
>
> When I create a consumer to an address that just does not exist, I expected
> to get some exception or that the client retries the operation. But there
> seems not even to be a log message which indicates a failure.
> Is this intended behavior or is this a bug? A more general description is: If
> AMQP server closes the receiver link, qpid jms client does not notify the
> user anyhow or does not re-establish the link.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]