简体   繁体   中英

IBM WAS autoreconnect to IBM MQ

I have a Java EE aplication on IBM WAS 8.5.5.x which connects to IBM MQ 9.0 with Activation specs. I'm interested in problem of autoreconnecting from WAS to MQ, if for some reason there was a connection loss (MQ server was shut down).

In IBM WAS admin console I have set Resources -> JMS -> Queue connection factories -> Factory -> Advanced properties -> Client reconnect options -> RECONNECT

I set Client reconnect timeout to 120 seconds.

That worked well (there was a reconnection) until queue manager was ended for a long period of time (about 9 hours).

Am I doing something wrong ? Is there a way to make QCF or Activation Spec auto reconnect if there was a connection loss. Is there a limit on number of reconnetion tries ?

This behavior can be controlled by updating the " Reconnection retry count " and " Reconnection retry interval " properties for "WebSphere MQ messaging provider" JMS provider in WAS console.

Path :Resources > JMS Providers > WebSphere MQ messaging provider (select scope) > Resource adapter properties (under Additional properties) .

Reconnection retry count : The maximum number of attempts made by a WebSphere MQ messaging provider activation specification to reconnect to a WebSphere MQ queue manager if a connection fails.
Reconnection retry interval : The time, in milliseconds, that a WebSphere MQ messaging provider activation specification waits before making another attempt to reconnect to a WebSphere MQ queue manager.

Refer : https://www.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.nd.doc/ae/umj_pjmswmq_raprops.html for more details.

@MIP / @JoshMc / Middleware admin( who might be reading) : Is there an adverse impact on WAS JVMs ( for instance JVM running out of thread or something ) if I increase the "reconnectionRetryCount" to a bigger number say 50 ? This is so that incase due to some "very unfortunate" incident my Queue manager is down for a longer period of time say 7 hours or so I want to make sure that as soon as the queue manager is up , my application server re-connects and establishes connection on its own without the need of a JVM restart.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM