Set Timeout when Solace is not responding

Options
Mansi
Mansi Member Posts: 1
edited February 2022 in General Discussions #1

Hi,
Our application uses Solace for publishing messages.
The code looks like this -

topicSession = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
TopicPublisher topicPublisher = topicSession.createPublisher(myTopic);
topicPublisher.publish(textMessage);

Our application couldn't connect to the solace server due to some connectivity reasons(with which we are not concerned about) and we got the following warnings -
javax.jms.JMSException: Error creating producer - transport error ((Client name: something-abc Local port: -1 Remote addr: something-xyz) - Timeout happened when reading response from the router.)

But the issue is our application waited for 10 mins during this time. Is there any way that our application doesn't wait so much time for getting response from solace.
We had not set any system properties in our application -
SOLACE_JMS_JNDI_CONNECT_TIMEOUT
SOLACE_JMS_JNDI_READ_TIMEOUT
But the default timeout for these is 30s and 10s respectively, then why did our application waited for so much time?

Answers