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 » General IBM MQ Support » two channels per client

Post new topic  Reply to topic
 two channels per client « View previous topic :: View next topic » 
Author Message
girish_tharwani
PostPosted: Thu Dec 30, 2010 6:21 am    Post subject: two channels per client Reply with quote

Voyager

Joined: 01 Aug 2001
Posts: 88
Location: Pune, India

I noticed this behaviour while doing a POC on MQ7 auto reconnect feature. Just wanted to check if anyone has any explanation for this while I check the documentation.

I have 4-5 qmgrs on remote servers. I created a CLNTCONN to each of these in my CCDT. I used AFFINITY(NONE) and CLNTWGHT(1) on all of these so that client chooses a channel randomly from the table.

I started simple JMS client on my desktop and monitored the number of running SVRCONN channel instances on all qmgrs. What I noticed is that for each client, two SVRCONN channel instances are started on two different qmgrs. One of them is actively used by client to put the messages on the qmgr, other one just stays there in running status without any messages being routed to that qmgr. When I did endmqm -i on the qmgr that had the active channel, instead of using the other passive channel, client started another channel to a different qmgr. Alternatively, when I killed the qmgr with passive channel, nothing happened. Client kept using the active channel without starting the another passive channel.

I tried a variation of above by making one CLNTCONN a preferred channel by setting its CLNTWGHT(0). In that situation, JMSClients created only one channel to this qmgr. When I killed this qmgr, those client failed over to another qmgr. Any clients started thereafter reverted back to two channels behaviour.

Two channel behaviour happens even if I set DefRecon=NO in mqclient.ini so it does not seem to be related to Auto Reconnect feature of MQ
Back to top
View user's profile Send private message
shashikanth_in
PostPosted: Thu Dec 30, 2010 7:52 am    Post subject: Re: two channels per client !!!! Reply with quote

Centurion

Joined: 26 Feb 2009
Posts: 123

girish_tharwani wrote:
I started simple JMS client on my desktop and monitored the number of running SVRCONN channel instances on all qmgrs. What I noticed is that for each client, two SVRCONN channel instances are started on two different qmgrs.


I am bit confused here. Do you mean the client application had connected to different queue managers at the same time?

Did your channel definitions in CCDT file had queue managers mentioned?
Back to top
View user's profile Send private message
girish_tharwani
PostPosted: Thu Dec 30, 2010 8:38 am    Post subject: Reply with quote

Voyager

Joined: 01 Aug 2001
Posts: 88
Location: Pune, India

Sorry.. missed an important piece of info.. I used same name (QMGRP) in the QMNAME field of all channels in the CCDT and while making connection from client, used *QMGRP as qmgr name. This coupled with AFFINITY(NONE) and CLNTWGHT(1) should have caused the client to connect to any one queue mgr at random. Connection was indeed random not in alphabatic order but with the glitch that there were two qmgrs showing running SVRCONN instances instead of one.
Back to top
View user's profile Send private message
shashikanth_in
PostPosted: Fri Dec 31, 2010 9:01 am    Post subject: Reply with quote

Centurion

Joined: 26 Feb 2009
Posts: 123

As far as I know, MQ JMS maintains two connections to MQ queue manager, the first one gets created when ConnectionFactory.CreateConnection is called and the second one when Connection.CreateSession is called. In this case you are using '*' in the queue manager name, I am suspecting that CreateConnection and CreateSession have established connection to two different queue managers and because of this you are seeing one instance of SVRCONN in two queue managers.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Dec 31, 2010 11:00 am    Post subject: Reply with quote

Grand High Poobah

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

I suspect this is due to the autoreconnect feature.
Your connection was correctly opened to QM1. For whatever reason this connection failed but did not close (hanging connection). As a result of the autoreconnect feature you then connected to the next available qmgr in your channel list.... Thus you see the channels open on 2 different qmgrs for the application...

Working as designed
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
girish_tharwani
PostPosted: Fri Dec 31, 2010 8:59 pm    Post subject: Reply with quote

Voyager

Joined: 01 Aug 2001
Posts: 88
Location: Pune, India

I also suspected the autoreconnect to be the reason but so I tried with DefRecon=NO. Still the same results.. two connections..
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Jan 01, 2011 5:54 am    Post subject: Reply with quote

Grand High Poobah

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

girish_tharwani wrote:
I also suspected the autoreconnect to be the reason but so I tried with DefRecon=NO. Still the same results.. two connections..

Does the application attempt to reconnect as well on a failed connection, or JMSException?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
girish_tharwani
PostPosted: Mon Jan 03, 2011 8:55 am    Post subject: Reply with quote

Voyager

Joined: 01 Aug 2001
Posts: 88
Location: Pune, India

to fjb_saper:
As I mentioned earlier, even if I set DefRecon=NO in mqclient.ini (ie ask mq not to retry the reconnect automatically), I can still see two running SVRCONN instances. I tried endmqm on qmgr which was not receiving any messages, no impact on client program. But when I tried endmqm the qmgr that was receiving the messages, the client failed with exception MQRC 2009 MQRC_CONNECTION_BROKEN (as expected)

To shashikanth_in:
You are right. I ran my program in debug mode and paused it after ConnectionFactory.CreateConnection. I could see one instance of SVRCONN. Then I allowed the program to run past the Connection.CreateSession statement and I could see the other instance.

But what next.. a PMR with IBM??
Back to top
View user's profile Send private message
mvic
PostPosted: Mon Jan 03, 2011 10:46 am    Post subject: Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

girish_tharwani wrote:
But what next.. a PMR with IBM??

I'm surprised you didn't open one already. Everything here is guesswork.. presumably IBM can find out a real answer for you.
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 » General IBM MQ Support » two channels per client
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.