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 » Get a notice when Consumers disconnect

Post new topic  Reply to topic
 Get a notice when Consumers disconnect « View previous topic :: View next topic » 
Author Message
kun.leeing
PostPosted: Tue Jun 16, 2009 7:43 am    Post subject: Get a notice when Consumers disconnect Reply with quote

Disciple

Joined: 27 Sep 2008
Posts: 171

How can I detect right away as message consumer disconnected with MQ Server?

Now as a test, the consumer waiting for messages did not have any responses when stopped network connection(OS) or even pulled the wire out.The consumer looks like holding the status of waiting seemingly, but disconnected in fact.

Now my way is to send a hearbeat message to Server and check the completion code and reason code. If success, I know the connection is still comfirmed. If not, to reconnect server until get right completion code. But I don't think this's a good method.

Can anybody gives me a good suggestion ?
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue Jun 16, 2009 9:16 am    Post subject: Re: Get a notice when Consumers disconnect Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kun.leeing wrote:
Can anybody gives me a good suggestion ?


Search the forum for KeepAlive, and the many discussions on clearing up orphaned connections.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jun 16, 2009 1:52 pm    Post subject: Re: Get a notice when Consumers disconnect Reply with quote

Grand High Poobah

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

kun.leeing wrote:
How can I detect right away as message consumer disconnected with MQ Server?

Now as a test, the consumer waiting for messages did not have any responses when stopped network connection(OS) or even pulled the wire out.The consumer looks like holding the status of waiting seemingly, but disconnected in fact.

Now my way is to send a hearbeat message to Server and check the completion code and reason code. If success, I know the connection is still comfirmed. If not, to reconnect server until get right completion code. But I don't think this's a good method.

Can anybody gives me a good suggestion ?

Did the consumer have an ExceptionListener registered with the connection?
What action was taken when it fired ?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Get a notice when Consumers disconnect
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.