Stale connection in IBM MQ when connecting with WAS and Spring-JMS - websphere

We are using Websphere Applicaion Server with Spring JMS, Around 25 applications connect to a IBM MQ. Off-late we are seeing lots of stale connection on the MQ channel to which all these applications connect.
By stale connections I mean the connection are not being used for many days and the application keeps creating new connections. We are not able to identify which application creates these connections that are not being used but they all use the same framework code
WAS version = 8.5.5
Spring = 4.1.2
The Spring jms:listener-container has the following configuration
connection-factory = org.springframework.jms.connection.DelegatingConnectionFactory
acknowledge=auto
concurrency=2-10
Any pointers on any configurations that can be done on QueueConnectionFactory (JMS Resource) on WAS or on the spring side would be helpful.
I know I have not given much information, but the problem is that there are no errors / exceptions, the application creates these connections to the MQ channel and all connections gets cleared when the server is restarted
Adding one more question
We use org.springframework.jms.connection.DelegatingConnectionFactory , for replying back, Does it make sense for us to close the session once we have send back the message?
Thanks in Advance
Charlie

Related

Websphere MQ Server-To-Server-Connection with Apache ActiveMQ possible?

Does Apache Active MQ provide Server-To-Server-Connection as IBM Websphere MQ does?
Background:
We currently have Websphere MQ 7.0.1 (CUST) installed to communicate with another remote Websphere MQ Server (GOV), which is not under our control.
The MQs hold a Server-To-Server-Connection via VPN-tunnel. We would like to replace our Websphere MQ with Apache ActiveMQ.
We have one QM-Manager with 4 queues and 3 channels.
Queues:
OUT (type remote): for sending messages to GOV
QOUT (local type transmission) that is used for OUT
IMP (local): used for receiving from GOV
DLQ: (local): dead letter queue
Channels:
conch: server connection
CUST_GOV: sender
GOV_CUST: receiver
I read a lot about bridging ActiveMQ to Websphere MQ (Client API, Resource Adapter, OSGi) with Camel.
Looks pretty easy with a Camel route, but this is at least a Client-Server setup.
E. G. https://www.shaishavparekh.com/2016/01/wmq-to-amq-bridge/
I need something that hides away the IBM proprietary channel stuff.
Now I found this entry: https://serverfault.com/questions/366743/apache-activemq-server-to-server-connection
As this is from 2012 I would like to ask, if anyone successful switched from Websphere MQ to ActiveMQ resp. is it still true that I can only use Client-Server?
ActiveMQ does not support a server-to-server connection to WebsphereMQ. As you mentioned, Camel would probably be the simplest way to get a connection between the two brokers.
To be clear, even if ActiveMQ did implement a bridge with WebsphereMQ it would almost certainly use the WebsphereMQ client so would fundamentally still be a client-server implementation. It's not really clear from your question why you want to avoid this.

Topic subscriber connection in Tibco

I have a process that starts with a topic subscriber.
What happens with a topic subscriber in Tibco if the EMS server shuts down?
I guess it will reconnect. But how many times or for how long it will try to reconnect?
The behaviour depends on various settings, set either on the client or server.
If you for example use a Java client you can set the behaviour through the connection factory:
TibjmsConnectionFactory.setReconnAttemptCount(10);
TibjmsConnectionFactory.setReconnAttemptDelay(1000);
TibjmsConnectionFactory.setReconnAttemptTimeout(1000);
You also can configure this behaviors on the server by using JNDI connections. Those can be defined through the factories.conf file.
BusinessWorks 5 does not reconnect by default, but honors all JNDI propagated settings.
It will try to connect indefinitely.

Spring JMS - IBM MQ has open input count issue

We are using Spring JMS to connect IBM MQ in that the MQ open input count keep on increase.is there any solution can we reduce the open input count. we are using concurrent connection as 1 only.
The IBM MQ connection handle behaves differently with Spring configuration. If you are using the CachingConnectionFactory that spring provides, please read my answer in the below thread.
JMS connections exhausted using WebSphere MQ
Please add more details to better understand the issue. The Apache camel will dynamically scale up and down the open input counts based on the load. Hope this helps!
That is a clear indication of your code not closing the queue you have opened. Close the consumer(s) you have created.

How to connect to remote weblogic JMS server?

I have a jms server running on weblogic and I need another application running on another server (weblogic as well) to listen to JMS topics sent by the JMS server mentioned before. The fact is that I don't know how to do that. I mean, what do I need on the consumer application side? Thansk in advance.
I know it´s a little old, but could help other people trying to achieve the same.
First you need to enable Cross-Domain Security on both domains envolved on your JMS communication. Please see specific documentation here: https://docs.oracle.com/middleware/1221/wls/SECMG/domain.htm#SECMG402
For reading a message from a JMS resource, there are a ton of examples you can search online, but basically you should rely on Weblogic´s t3 protocol. Here is a relativelly recent example using Spring Boot: Connect to remote jms queue with Spring Boot

Configuration of WebMethods Client to connect to WebSphere JMS (not WebSphere MQ)

Currently I have setup two queues on WebSphere 7. One for sending and one for recieving messages.
I have configured a activation spec on the receiving queue and the messages are consumed fine by a Message Bean.
Also I have written a client that can run on a separate jvm which can send messages fine to the queue.
I am sure that the queues work.
Now I want to know how can I connect them with WebMetods. I know that WebMethods supports JBoss and WebLogic but no support for WebSphere.
I should be able to get this working just by providing:
a provider url - "iiop://172.17.13.65:2809"
a connection factory - "jms/ConnectionFactroy"
a queue name- "jms/inQueue"
and an initial context - "com.ibm.websphere.naming.WsnInitialContextFactory"
(at least this is what my client is using)
Is there anybody that has resolved this issue? And what are the steps they took?
Thank you in advance for your help.
We were able to get this implementation happen.
To solve this Web Methods had to import some jar files for Client JMS:
com.ibm.ws.ejb.thinclient_7.0.0 + com.ibm.ws.orb_7.0.0 + com.ibm.ws.sib.client.thin.jms_7.0.0
And use a bootstrap of this type PROVIDER_URL: "iiop://natasha:2810"
Alaso these details as previously mentioned:
a factory - "jms/ConnectionFactroy"
a queue name- "jms/inQueue" and
an initial context - "com.ibm.websphere.naming.WsnInitialContextFactory"

Resources