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 » JMS Auto reconnect with CCDT that's has Multiple QManagers

Post new topic  Reply to topic Goto page 1, 2  Next
 JMS Auto reconnect with CCDT that's has Multiple QManagers « View previous topic :: View next topic » 
Author Message
divyadam
PostPosted: Wed Sep 25, 2019 4:28 pm    Post subject: JMS Auto reconnect with CCDT that's has Multiple QManagers Reply with quote

Novice

Joined: 03 Oct 2018
Posts: 22

our Setup has 2 QMGRs one in each Datacenter. we use CCDT which hasheighst weight to QMGR1. When QMGR1 in DataCenter1 Goes Down apps are not reconnecting.
I tried Another Setup.

Defined 2 QMGRs in each DataCenter; total of 4 Managers and listed all 4 QMGRs in the CCDT. when I shutdown QMGR1 in DataCenter1 apps reconnect with Auto reconnect feature in JAVA JMS. but when I shutdown both QMGRs ( QMGR1 and QMGR2) apps are not connecting to either of the cross datacenter QMGRs(QMGR3 ad QMGR4).

Applogs only shows the Connection failure to QMGR1 in DataCenter1. does any one has similar issue with cross dataCenter connection.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Sep 25, 2019 5:09 pm    Post subject: Reply with quote

Grand High Poobah

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

Depends what you allow on your reconnect. If the reconnect is only allowed to the same qmgr your behavior not reconnecting to QM3 and QM4 makes sense.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
hughson
PostPosted: Wed Sep 25, 2019 8:03 pm    Post subject: Reply with quote

Padawan

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

Please can you show us your DEFINE CHANNEL commands that build the CCDT. Specifically what is in the QMNAME parameter for each record.

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
divyadam
PostPosted: Wed Sep 25, 2019 9:07 pm    Post subject: Reply with quote

Novice

Joined: 03 Oct 2018
Posts: 22

HERE IS THE CCDT definitions


CHANNEL(QMGR1 CHL )
CHLTYPE(CLNTCONN)
AFFINITY(NONE)
CLNTWGHT(49)
COMPHDR(NONE)
CONNAME(<QMGR1 VIP> <PORT>)
DESCR( )
LOCALADDR( )
MAXMSGL(10485760)
QMNAME(ABCD)
SSLCIPH(TLS_RSA_WITHAES_256_CBC_SHA256)
SSLPEER(CN=QMGR1)
TRPTYPE(TCP)

CHANNEL(QMGR2 CHL )
CHLTYPE(CLNTCONN)
AFFINITY(NONE)
CLNTWGHT(49)
COMPHDR(NONE)
CONNAME(<QMGR2 VIP> <PORT>)
DESCR( )
LOCALADDR( )
MAXMSGL(10485760)
QMNAME(ABCD)
SSLCIPH(TLS_RSA_WITHAES_256_CBC_SHA256)
SSLPEER(CN=QMGR2)
TRPTYPE(TCP)

CHANNEL(QMGR3 CHL )
CHLTYPE(CLNTCONN)
AFFINITY(NONE)
CLNTWGHT(1)
COMPHDR(NONE)
CONNAME(<QMGR3 VIP> <PORT>)
DESCR( )
LOCALADDR( )
MAXMSGL(10485760)
QMNAME(ABCD)
SSLCIPH(TLS_RSA_WITHAES_256_CBC_SHA256)
SSLPEER(CN=QMGR3)
TRPTYPE(TCP)

CHANNEL(QMGR4 CHL )
CHLTYPE(CLNTCONN)
AFFINITY(NONE)
CLNTWGHT(1)
COMPHDR(NONE)
CONNAME(<QMGR4 VIP> <PORT>)
DESCR( )
LOCALADDR( )
MAXMSGL(10485760)
QMNAME(ABCD)
SSLCIPH(TLS_RSA_WITHAES_256_CBC_SHA256)
SSLPEER(CN=QMGR4)
TRPTYPE(TCP)


*** the Idea is to have QMGR1 and QMGR2 in datacenter1 are primary andQMGR3 and QMGR4 in DataCenter2 are backup but actively running on DataCenter2. When in issue JMS connections should failover to QMGRs running in DataCenter2.
Back to top
View user's profile Send private message
hughson
PostPosted: Wed Sep 25, 2019 9:57 pm    Post subject: Reply with quote

Padawan

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

I have just experimented with the same setup of a CCDT and I see connections going to QMGR3 if both QMGR1 and QMGR2 are unavailable to make connections to. I also see the occasional connection to QMGR3 even when both QMGR1 and QMGR2 are also up, since 1 in 50 connections is able to be sent there. I did this testing with amqsputc which is 'C' application not a Java application. I did not use reconnect.

You did not say which reconnect options you were using. Can we see your connection code in your JMS application so we can understand more fully. I don't think your CCDT is the problem so we need to look at other details now please.

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
HubertKleinmanns
PostPosted: Thu Sep 26, 2019 12:13 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

In JMS you have to set the reconnect options with this call
Code:
MQConnectionFactory.setClientReconnectOptions()


Possible values are "WMQConstants.WMQ_CLIENT_RECONNECT_Q_MGR" (reconnect to the same QMgr), "WMQConstants.WMQ_CLIENT_RECONNECT" (reconnect to any QMgr) or "WMQConstants.WMQ_CLIENT_RECONNECT_AS_DEF" (reconnect behaviour set by channel attribute).

In addition in the SVRCONN definitions the attribute SHARECNV has to be at least "1".
_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
divyadam
PostPosted: Thu Sep 26, 2019 4:09 am    Post subject: Reply with quote

Novice

Joined: 03 Oct 2018
Posts: 22

thank you folks. I have a code review with my developer today. will get you more info.
Back to top
View user's profile Send private message
divyadam
PostPosted: Thu Sep 26, 2019 5:36 am    Post subject: Reply with quote

Novice

Joined: 03 Oct 2018
Posts: 22

Hi HugHson
can you give me the mqscputc options you used to invoke CCDT and man a client connection.
Back to top
View user's profile Send private message
HubertKleinmanns
PostPosted: Thu Sep 26, 2019 6:15 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

In a shell (Unix or Windows) just specify these settings:

Windows:
Code:
set MQCHLLIB=<path to your CCDT file>
set MQCHLTAB=<name of your CCDT file>


Unix (bash, ksh):
Code:
export MQCHLLIB=<path to your CCDT file>
export MQCHLTAB=<name of your CCDT file>


Unix (Bourne shell):
Code:
MQCHLLIB=<path to your CCDT file>
MQCHLTAB=<name of your CCDT file>
export MQCHLLIB MQCHLTAB


And dont't forget to unset the MQSERVER setting:

Windows:
Code:
set MQSERVER=


Unix:
Code:
unset MQSERVER


Then run "amqsputc" or whatever you want.
_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
hughson
PostPosted: Thu Sep 26, 2019 3:07 pm    Post subject: Reply with quote

Padawan

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

Exactly as above
_________________
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
divyadam
PostPosted: Thu Sep 26, 2019 3:44 pm    Post subject: Reply with quote

Novice

Joined: 03 Oct 2018
Posts: 22

Here is the JMS client code we use

<Resource
CCDTURL="<TAB File with above definition>"
QMGR="ALERTS" TRAN="1" auth="Container"
description="Connection Factory"
factory="com.ibm.mq.jms.MQQueueConnectionFactoryFactory"
name="JMSException/MQConnectionFactoryCCDT"
type="com.ibm.mq.jms.MQQueueConnectionFactory"
/>
Back to top
View user's profile Send private message
hughson
PostPosted: Thu Sep 26, 2019 4:05 pm    Post subject: Reply with quote

Padawan

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

Could you show us where you set the reconnect option?
_________________
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
divyadam
PostPosted: Thu Sep 26, 2019 4:52 pm    Post subject: Reply with quote

Novice

Joined: 03 Oct 2018
Posts: 22

we don't have the reconnect option. was told the QueueConnectionFactory method has default reconnect feature.
Back to top
View user's profile Send private message
divyadam
PostPosted: Thu Sep 26, 2019 5:22 pm    Post subject: Reply with quote

Novice

Joined: 03 Oct 2018
Posts: 22

HI Yatiri
with "MQConnectionFactory.setClientReconnectOptions()" if I have to use CCDT should I use "WMQConstants.WMQ_CLIENT_RECONNECT_AS_DEF" (reconnect behaviour set by channel attribute)"?

also what does 'int' value with 'options'

I don't want to set "SHARECNV" on ServerConn cahannel cause it would piggy back on the previous connection I believe.
I was JMC connections to be non-persistent.
Back to top
View user's profile Send private message
divyadam
PostPosted: Thu Sep 26, 2019 5:53 pm    Post subject: Reply with quote

Novice

Joined: 03 Oct 2018
Posts: 22

Also
Application is taking almost 300 seconds to realize the QMGRs in DataCenter1 are down. that's the default OS timeout. we are planning to Implement JMS TCP timeout as one of the java option that would speed up the QMGR down acknowledgement.

Is there an option at MQConnectionFactory that I can make use of to terminate connection initiation earlier and force the JMS connection to do CCDT lookup?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ Java / JMS » JMS Auto reconnect with CCDT that's has Multiple QManagers
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.