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.
Related
I have a scenario to create fault tolerant MQ listener/consumer using java spring. We plan to deploy as a sprint boot MQ listener across multiple servers but only 1 should be able to consume it. So once it is down the other listener should start picking up the message. Please suggest how to achieve it. Thanks
JMS itself has no support for exclusive consumers; consult your JMS provider documentation to see if it provides such functionality as an extension.
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
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
I am using IBM MQ & active mq in my application using Spring jms. I have a requirement to schedule a message for redelivery after x seconds.
I am able to achieve it in Active mq by setting the AMQ_SCHEDULED_DELAY header. This makes the message to get delivered to the queue after a specified number of seconds.
Is there anything similar in IBM MQ that I can use to achieve the above mentioned functionality ?
Any help is appreciated.
Well JMS 1.1 specification does not mention anything about delayed delivery of a message. Hence you don't have that feature in WMQ. Just released JMS 2.0 specification describes this feature.
yeah, WMQ isn't the best JMS impl for that sort of thing. Take a look at apache camel. It can provide this sort of delayed message routing.
I wrote a java client to connect to jms in websphere.
I was able to connect and produce and consume message.
Problem I am facing is when I do Session.createQueue(), websphere jms is not creating a new queue.
Please could some one throw some light on this issue...
Thanks in advance...
If you are working with WebSphere MQ as the messaging provider within WebSphere Application Server the queue will need to be created on the WebSphere MQ QueueManager first. This can be done either via the graphical WMQ Explorer or via the command line using the 'runmqsc' tool.
Information can be found for these via the WMQ InfoCentre - suggest doing a websearch for "WMQ Library" to get the latest link, currently though it is http://www-01.ibm.com/software/integration/wmq/library/index.html
Topics though don't need to be pre-created - though they can be if required. Various properties can be set different to the default.
If the Queue doesn't need to be permanent, for example as a temporary reply to then look into creating a temporary queue from the JMS Connection.
createQueue doesn't create a new queue. It simply creates a javax.jms.Queue object from a vendor specific identifier. javax.jms.Queue objects are just references to existing queues. Typically, you retrieve javax.jms.Queue objects from JNDI; createQueue is only useful in scenarios where using JNDI is not possible or not desirable.
Note: there is one exception to this, namely JMS providers that support autocreation of queues (I think ActiveMQ has such a feature).