1

So I have a very simple JMS Listener running on Spring Boot, and running on a Kubernetes cluster on Google Cloud.

The only thing i've defined is the following in my configuration class:

@Bean
public DefaultJmsListenerContainerFactory cFactory(ConnectionFactory connectionFactory, JmsErrorHandler errorHandler) {
    logger.info("cFactory called...");
    DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory();
    factory.setConnectionFactory(connectionFactory);
    factory.setErrorHandler(errorHandler);
    factory.setTransactionManager(null);
    factory.setSessionTransacted(false);
    return factory;
}

My Application.properties:

solace.jms.host=tcps://[host]
solace.jms.clientUsername=[username]
solace.jms.clientPassword=[password]
solace.jms.msgVpn=[msgvpn]
solace.jms.queueName=[queuename]
server.port=8080
logging.level.com.solacesystems=INFO

JMS Listener:

@JmsListener(destination="${solace.jms.queueName}", containerFactory = "cFactory")
public void onMessage(Message message) {
    [Do stuff with message]
}

I have this issue in the logs that says the following:

2020-02-28 21:08:40.247  INFO 1 --- [nio-8080-exec-6] c.s.j.protocol.impl.TcpClientChannel     : Connecting to host 'orig=tcps://[host goes here], scheme=tcps://, host=[host], port=55443' (host 1 of 1, smfclient 294, attempt 1 of 1, this_host_attempt: 1 of 1)
2020-02-28 21:07:21.968  INFO 1 --- [enerContainer-1] c.m.a.notam.listener.JmsMessageListener  : Message Received and processed
2020-02-28 21:07:20.572  INFO 1 --- [nio-8080-exec-8] c.s.jcsmp.protocol.smf.SSLSmfClient      : closeOutbound() : isSslDowngradeEnabled: false, mSslEngineClosed: false
2020-02-28 21:07:20.572  INFO 1 --- [nio-8080-exec-8] c.s.j.protocol.impl.TcpClientChannel     : Channel Closed (smfclient 262)
2020-02-28 21:07:20.535  INFO 1 --- [nio-8080-exec-8] c.s.j.protocol.impl.TcpClientChannel     : Connected to host 'orig=tcps://[host]:55443, scheme=tcps://, host=[host], port=55443' (smfclient 262)

It basically loops like this all day long and I can't figure out why. When I run this locally on my development machine the connection remains open and messages are streaming in just fine.

There is no other log to give me a clue why the channel is closing on its own like this.

Any one have any ideas what the problem might be?

Felix Khazin
  • 1,479
  • 2
  • 10
  • 16
  • How are you deploying your application to your Kubernetes cluster? – Dawid Kruk Mar 02 '20 at 10:29
  • Jenkins X (https://jenkins-x.io/) – Felix Khazin Mar 02 '20 at 13:05
  • Can you enable more detailed logging for the solace packages, and post that please? – Szocske Mar 04 '20 at 15:14
  • Do you have access to the logs on the Solace broker, respectively the event log? There should be a corresponding client disconnect entry with a reason for the close that might help you determine where the connections is being closed from (e.g. client itself, broker or something in the network causing it). – Christian.H Apr 29 '20 at 09:54
  • I think the solution here might be to use a CachingConnectionFactory instead of the default. Have you given that a shot? – Mrc0113 Apr 30 '20 at 15:41
  • I am also facing the same issue, even though using CachingConnectionFactory – user2169677 Jun 23 '21 at 13:47

0 Answers0