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 Installation/Configuration Support » MQ Client Auto-Reconncect

Post new topic  Reply to topic
 MQ Client Auto-Reconncect « View previous topic :: View next topic » 
Author Message
gfrench
PostPosted: Mon Mar 02, 2015 3:33 am    Post subject: MQ Client Auto-Reconncect Reply with quote

Acolyte

Joined: 10 Feb 2002
Posts: 71

I'm playing with Version 7.5.0.3 server and client on same windows machine.

I can run the samples amqsphac and amqsghac to put and get messages from a queue. I can see they are using my mqclient.ini and when I take the queue manager down with an endmqm -r GJF I can see it tried reconnecting around every 8 seconds


Quote:
CHANNELS:
DefRecon=QMGR ; Auto reconnect but only to same QMGR
ReconDelay=(8000,1000) ; 8 seconds delay before reconnect attempt
MQReconnectTimeout=1800 ; Time limit in secs (half hour) before giving up
ServerConnectionParms=TO.GJF/TCP/localhost(1414)


My understanding, based on the manuals, is that without modification of code, I can make an existing MQCONN program autoreconnect using the mqclient.ini. However no matter how I try, using the same process as I do with amqsphac, with amqsputc I always get 2009, broken connection.

I've possibly answered my own question here, but can someone confirm its the way amqsputc has been compiled meaning it doesn't meet the
Quote:
Must be threaded

requirement?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
PaulClarke
PostPosted: Mon Mar 02, 2015 3:59 am    Post subject: Reply with quote

Grand Master

Joined: 17 Nov 2005
Posts: 1002
Location: New Zealand

Well, certainly you need to have a thread enabled program for reconnect to happen. However, if I had to guess I'd suspect it is the way the two are connecting that accounts for the change. AMQSPHAC uses MQCNO_RECONNECT whereas AMQPUTC does, by default. Which means that AMQSPUTC will be using MQCNO_RECONNECT_AS_DEF which in turns means that it will take whether reconnect is active from the client channel definition. What is the DEFRECON setting of your CLNTCONN?

Cheers,
Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
gfrench
PostPosted: Mon Mar 02, 2015 5:06 am    Post subject: Reply with quote

Acolyte

Joined: 10 Feb 2002
Posts: 71

You are correct with AMQSPHAC doing MQCONNX with cno.Options = MQCNO_RECONNECT

AMQSPUT does the old MQCONN so no options on it. However I specified DEFRECON(QMGR) on the CLNTCONN chl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
PaulClarke
PostPosted: Mon Mar 02, 2015 6:09 am    Post subject: Reply with quote

Grand Master

Joined: 17 Nov 2005
Posts: 1002
Location: New Zealand

Ah Ok. I saw where you said you had put DEFRECONN in the INI file but I saw no mention of the channel definition.

Cheers,
Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
PeterPotkay
PostPosted: Mon Mar 02, 2015 7:11 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7716

gfrench,
This is a good write up on the topic of reconnectable clients and where it does and does not work.


Webcast replay: Exploiting the Automatic Client Reconnect feature in WebSphere MQ 7
http://www-304.ibm.com/support/docview.wss?uid=swg27038186
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
gfrench
PostPosted: Mon Mar 02, 2015 8:26 am    Post subject: Reply with quote

Acolyte

Joined: 10 Feb 2002
Posts: 71

Thanks. That link spells it out quite clearly
Quote:
The MQ client application (sample amqsputc) was not developed to take advantage of the automatic client reconnection


However, the manuals are a bit sketchy with comments like:-
Quote:
You can make your client applications reconnect automatically, without writing any additional code, by configuring a number of components


Quote:
Many applications are written in such a way that they are able to take advantage of auto-reconnection with no additional coding.


We also fulfill all the requirements in the "Table 2. Automatic reconnection configuration requirements" (excepting I'm not sure if the compiled amqsputc is threaded).

So is this a documentation bug? Does the table needs to state, the code needs to use MQCONNX and not MQCONN to allow auto reconnection? If its not this can someone explain why amqsput was not written for reconnection?

Appreciate any help. Thanks
Back to top
View user's profile Send private message Send e-mail Visit poster's website
zpat
PostPosted: Mon Mar 02, 2015 8:34 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

The point of all this debate - is that we would like to leverage the auto-reconnect feature without modifying existing applications (in some cases we don't own them).

Seems this is really a pipe-dream.
_________________
Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Mon Mar 02, 2015 10:10 am    Post subject: Reply with quote

Grand Master

Joined: 17 Nov 2005
Posts: 1002
Location: New Zealand

Well, I'm pretty certain this used to work. That is, after all, the whole point of the DEFRECONN attribute. However, I have just tried it myself and I can't get AMQSPUTC to reconnect either. Now, it may well be something silly I'm missing but I can't think what it is. I took a trace and the key line is rcnCheckReconnectable. That function prints out "Session not reconnectable". Now, if memory serves that function should take note of the default reconnect setting from the channel definition.

Clearly something is amiss however since I can't step through the code any more I can't see just what it is.

If I were you I think I'd be raising a PMR and seeing what MQ Development say about it.

Cheers,
Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » MQ Client Auto-Reconncect
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.