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 API Support » MQSeries re connect problem

Post new topic  Reply to topic
 MQSeries re connect problem « View previous topic :: View next topic » 
Author Message
tgregg
PostPosted: Tue Oct 14, 2003 2:55 pm    Post subject: MQSeries re connect problem Reply with quote

Newbie

Joined: 14 Oct 2003
Posts: 3
Location: Atlanta

What calls do we have to make in our client program to recover from the remote server being stopped and restarted?

we are attempting to close the queue, disconnect from the qmgr, reconnect and reopen before issuing the get or put but we cant' recover.

using pymq client with NT / W 2000, TCP / IP connection to unknown remote server.

Thanks
Back to top
View user's profile Send private message Send e-mail
clindsey
PostPosted: Wed Oct 15, 2003 5:23 am    Post subject: Reply with quote

Knight

Joined: 12 Jul 2002
Posts: 586
Location: Dallas, Tx

If the qmgr bounces, your next api call should return 2009, MQRC_CONNECTION_BROKEN. Then your connection handle is no longer valid so you cannot close the queue or disconnect. Just reconnect and then reopen the queue. This only works for a pure client connection, e.g. a socket connection. If you are connected in server bindings, e.g. a shared memory connection, your application has to be closed before the
queue manager will restart.

Charlie
Back to top
View user's profile Send private message
EddieA
PostPosted: Wed Oct 15, 2003 1:25 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

You could also use the Fail if Quiescing option to be notified if the Queue Manager is terminating.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
tgregg
PostPosted: Tue Oct 28, 2003 8:24 am    Post subject: Reply with quote

Newbie

Joined: 14 Oct 2003
Posts: 3
Location: Atlanta

we do use the quiescing option and get an error that says the gmgr is stopping.

what should we do then?

close? disconnect? or just try to reconnect until the qmgr comes back up?

thanks for the help so far.
Back to top
View user's profile Send private message Send e-mail
EddieA
PostPosted: Tue Oct 28, 2003 9:57 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

You would at least have to terminate any connections to the QM, because even if you waited for it to come back up, the connection handles would be invalid.

What you do after cleaning up is down to the design of your application/system.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
tgregg
PostPosted: Wed Oct 29, 2003 4:26 am    Post subject: Reply with quote

Newbie

Joined: 14 Oct 2003
Posts: 3
Location: Atlanta

dlindsays says if i get the 2009 error i shouldn't close and disconnect because handle is invalid. Are you saying if i get the qmg_stopping error i should close and disconnect before attempting to reconnect?

i appreciate the point about design, but i think my problem is one of making the right calls in the right order to keep mq happy. right now only solution is restarting the app, so at least i am connecting correctly. i just don't think i am making the right calls in the right order when it fails.

thanks again for the patience and help
Back to top
View user's profile Send private message Send e-mail
dgolding
PostPosted: Wed Oct 29, 2003 7:56 am    Post subject: Reply with quote

Yatiri

Joined: 16 May 2001
Posts: 668
Location: Switzerland

Hi Tom,

I did a quick test with a modified AMQSGET (not client, I must admit, but it should be the same) - I did a GET with FAIL_IF_QUIESCING, then close, then disconnect, then sleep and reattempt the MQCONN again.

This worked fine - I shut the queue manager down while the prog was in the MQGET wait, then after the disconnect (while it was sleeping) I restarted the queue manager - and the connect seem to work fine.

HTH
Back to top
View user's profile Send private message Visit poster's website
techno
PostPosted: Wed Oct 29, 2003 9:21 am    Post subject: Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

What is the equivalent option to QUIESCING in MQ Base Java?

Thanks
Back to top
View user's profile Send private message
bower5932
PostPosted: Wed Oct 29, 2003 10:48 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

There is an MQC.MQOO_FAIL_IF_QUIESCING that you can add to your openOptions on the MQQueueManager. You can also add it to the options of your MQGetMessageOptions which you pass into the get.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
techno
PostPosted: Wed Oct 29, 2003 11:00 am    Post subject: Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

I am sorry. I should have asked for the equivalent options in JMS. Could you let me know?

Thanks
Shiva.
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 API Support » MQSeries re connect problem
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.