ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Autoreconnect with JMS

Post new topic  Reply to topic
 Autoreconnect with JMS « View previous topic :: View next topic » 
Author Message
mrk.for.dev
PostPosted: Tue Apr 27, 2021 7:38 am    Post subject: Autoreconnect with JMS Reply with quote

Novice

Joined: 11 Jan 2021
Posts: 23

A question that may seem easy to you but is not for me
What is the purpose of an autoreconnect?
Does it have to be configured on the QM only?
Or does the application code need to be updated as well?

MQ Version: 9.2.1

Thanks
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Apr 27, 2021 4:41 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

It's a property of the connection factory, and you really want it if you are using a uniform cluster...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mrk.for.dev
PostPosted: Tue Apr 27, 2021 11:06 pm    Post subject: Reply with quote

Novice

Joined: 11 Jan 2021
Posts: 23

If we use a RDQM cluster, and the application is connected to the Queue Manager using a floating IP address, we may need this autoreconnect?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Apr 28, 2021 1:00 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

mrk.for.dev wrote:
If we use a RDQM cluster, and the application is connected to the Queue Manager using a floating IP address, we may need this autoreconnect?

Yes you do. Every time the host changes in RDQM...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
hughson
PostPosted: Wed Apr 28, 2021 3:35 am    Post subject: Re: Autoreconnect with JMS Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
Location: Bay of Plenty, New Zealand

mrk.for.dev wrote:
What is the purpose of an autoreconnect?


Auto-reconnect remakes the connection to the queue manager when you lose it, say because of a network blip, or longer outage such as a failover of an HA or RDQM queue manager, or queue manager recycle.

If you don't use it, you can instead code your application to catch the error that it will be given when the connection is lost, and remake the connection explicitly in your code. Auto-reconnect just does it automatically to save you having to code for it explicitly.

You configure it at the application side not at the queue manager.

Cheers,
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
mrk.for.dev
PostPosted: Wed Apr 28, 2021 7:08 am    Post subject: Reply with quote

Novice

Joined: 11 Jan 2021
Posts: 23

Thank you very much for your help.

I created a JMS app to test the autoreconnect with
Code:
cf.setIntProperty(WMQConstants.WMQ_CLIENT_RECONNECT_OPTIONS, WMQConstants.WMQ_CLIENT_RECONNECT);
.

Test OK: when I restart the MQ instance after the application connects and before the
Code:
consumer.receive()


Test KO: when I restart the MQ instance, when the application is waiting on consumer.receive().
Is this normal to have an error : JMSCMQ0002: 'MQCMIT and ('MQCC_FAILED') ; reason '2003'?
If not, should an application that connects to MQ stay connected all the time until it reads a message?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Autoreconnect with JMS
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.