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 » Connection between WAS and MQ using CCDT file

Post new topic  Reply to topic
 Connection between WAS and MQ using CCDT file « View previous topic :: View next topic » 
Author Message
punky
PostPosted: Wed Nov 29, 2017 6:27 pm    Post subject: Connection between WAS and MQ using CCDT file Reply with quote

Apprentice

Joined: 26 May 2011
Posts: 44
Location: India

Hello Experts,

Need your help for a question related to using CCDT file for connection between WebSphere Application Server and IBM MQ.

Platform Used: Windows Server 2012 R2
WebSphere Application Server version 9.0.0.2
IBM MQ version 9.0.1


MQHost1
Port: xxxx
Queue Manager Name: QM1
Cluster: CLUS1
Server Connection: SVRCONN1
Client Connection1: WAS.TO.MQ1(MQHost1(xxxx)); QM Name: QMGR; Affinity: Preferred; Weight:50
Client Connection2: WAS.TO.MQ2(MQHost2(yyyy)); QM Name: QMGR; Affinity: None; Weight:1
Queue: Q1; Cluster: CLUS1

MQHost2
Port: yyyy
Queue Manager: QM2
Cluster: CLUS1
Server Connection: SVRCONN2
Client Connection1: WAS.TO.MQ2(MQHost2(yyyy)); QM Name: QMGR; Affinity: Preferred; Weight:50
Client Connection2: WAS.TO.MQ1(MQHost1(xxxx)); QM Name: QMGR; Affinity: None; Weight:1
Queue: Q1; Cluster: CLUS1


WASHost1 (Standalone)
Connection Factory: MQ_CCDT
JNDI: jms/QMGR_CCDT
File location:
Queue Manager Name: *QMGR

Queue
JNDI: jms/Q1
Queue Manager Name: blank

WASHost2 (Standalone)
Connection Factory: MQ_CCDT
JNDI: jms/QMGR_CCDT
File location:
Queue Manager Name: *QMGR

Queue
JNDI: jms/Q1
Queue Manager Name: blank

Scenario:
Application which is deployed on WAS is built in spring java (and not using MBEANS) which performs function of sending and getting messages from the queue (both put and get operations).
When one of the Queue Manager QM2 goes down, connection from WAS2 swings over to MQ1 (at this moment both WAS1 and WAS2 are connected to MQ1).
But later when Queue manager QM2 is brought up, WAS1 and WAS2 still continues to listen to the queues on Queue Manager QM1.
So messages on QM2 are not consumed (The other half of design includes 2 queue managers on z/OS which are also part of same MQ cluster CLUS1. Application on mainframe side also posts messages to the Cluster Queues).

To bring back the initial state (WAS1 connected to MQ1 and WAS2 connected to MQ2), I have to restart the Application Server WAS2 (I have tried restarting application but doesn’t help for this issue).

Question: Is their any way in the setting/configurations (on MQ or WAS) that I can use so that the swing back can happen automatically when the other Queue Manager comes up?


Best Regards,
Punky
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Thu Nov 30, 2017 6:28 am    Post subject: Reply with quote

Grand High Poobah

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

You have a flaw in your design. WASHost1 and WASHost2 should both consume from both QM1 and QM2. This way one of the WAS goes down and no messages are left over. The same way if you bounce one of the queue managers.

However if a qmgr goes down for a time interval beyond the automatic reconnect from WAS, you will have to restart the MDB service to reconnect to the resource.

Hope this helps.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
punky
PostPosted: Thu Nov 30, 2017 6:36 am    Post subject: Reply with quote

Apprentice

Joined: 26 May 2011
Posts: 44
Location: India

I am using CCDT files from individual Queue managers in the corresponding WAS. So each WAS is expected to connect to both MQ with a preference given to corresponding MQ (as I am using affinity)

MQHost1
Port: xxxx
Queue Manager Name: QM1
Cluster: CLUS1
Server Connection: SVRCONN1
Client Connection1: WAS.TO.MQ1(MQHost1(xxxx)); QM Name: QMGR; Affinity: Preferred; Weight:50
Client Connection2: WAS.TO.MQ2(MQHost2(yyyy)); QM Name: QMGR; Affinity: None; Weight:1
Queue: Q1; Cluster: CLUS1

MQHost2
Port: yyyy
Queue Manager: QM2
Cluster: CLUS1
Server Connection: SVRCONN2
Client Connection1: WAS.TO.MQ2(MQHost2(yyyy)); QM Name: QMGR; Affinity: Preferred; Weight:50
Client Connection2: WAS.TO.MQ1(MQHost1(xxxx)); QM Name: QMGR; Affinity: None; Weight:1
Queue: Q1; Cluster: CLUS1

Please let me know if there is some other configuration to be done to enable consuming from both Queue Managers.
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Thu Nov 30, 2017 9:37 am    Post subject: Reply with quote

Grand High Poobah

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

punky wrote:
I am using CCDT files from individual Queue managers in the corresponding WAS. So each WAS is expected to connect to both MQ with a preference given to corresponding MQ (as I am using affinity)

Please let me know if there is some other configuration to be done to enable consuming from both Queue Managers.

Apparently you are not getting my meaning.
Each WAS is expected to have a connection at all times to each of the qmgrs.

Say both qmgrs are up but only one WAS is running. That instance of WAS will need to consume the queues on both QM1 and QM2.

Let's not even think here about the exception cases where one of the qmgrs or one of the WAS servers is down...

So WAS1 consumes QM1 and QM2
WAS2 consumes QM1 and QM2.

Your design has the default setup of
WAS1 consumes QM1
WAS2 consumes QM2

This is different from what I am suggesting here.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
punky
PostPosted: Thu Nov 30, 2017 6:12 pm    Post subject: Reply with quote

Apprentice

Joined: 26 May 2011
Posts: 44
Location: India

Quote:
Each WAS is expected to have a connection at all times to each of the qmgrs.

Say both qmgrs are up but only one WAS is running. That instance of WAS will need to consume the queues on both QM1 and QM2.


Is it possible to do it in the current setup?

Is your suggestion to make 2 separate Connection Factory/Queue Connection factory and asking application to use the separate JNDI to make parallel connections so it can consume from queues on both Queue Managers?
Back to top
View user's profile Send private message Visit poster's website
punky
PostPosted: Sun Dec 03, 2017 6:26 pm    Post subject: Reply with quote

Apprentice

Joined: 26 May 2011
Posts: 44
Location: India

Hello Guys,

Please let me know possible options on how I can make the WAS to connect to 2 Queue Managers (with different names and running on 2 separate VMs) simultaneously so that the application running can consume messages from both.

Best Regards,
Punky
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Sun Dec 03, 2017 10:22 pm    Post subject: Reply with quote

Grand High Poobah

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

punky wrote:
Hello Guys,

Please let me know possible options on how I can make the WAS to connect to 2 Queue Managers (with different names and running on 2 separate VMs) simultaneously so that the application running can consume messages from both.

Best Regards,
Punky

You need 2 connection factories defined to WAS, one for each qmgr...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
punky
PostPosted: Sun Dec 03, 2017 10:53 pm    Post subject: Reply with quote

Apprentice

Joined: 26 May 2011
Posts: 44
Location: India

Hi fjb_saper,

Just to get a better understanding we need:
1. Two instances of the application each connection with 1 Connection Factory (defined for 1 queue manager).
2. Asking the application team to handle the connection to 2 different MQ programmatically.


Are there any other alternative which can be done at WAS/MQ administration level without changing the approach used in the application/consuming program?
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Mon Dec 04, 2017 5:39 am    Post subject: Reply with quote

Grand High Poobah

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

punky wrote:
Hi fjb_saper,

Just to get a better understanding we need:
1. Two instances of the application each connection with 1 Connection Factory (defined for 1 queue manager).
2. Asking the application team to handle the connection to 2 different MQ programmatically.


Are there any other alternative which can be done at WAS/MQ administration level without changing the approach used in the application/consuming program?

For each instance of the application (ear file) you need 2 connection factories, one to each qmgr...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mq__quest
PostPosted: Thu Feb 22, 2018 7:02 am    Post subject: Reply with quote

Apprentice

Joined: 21 Aug 2017
Posts: 47

fjb_saper wrote:
You have a flaw in your design. WASHost1 and WASHost2 should both consume from both QM1 and QM2. This way one of the WAS goes down and no messages are left over. The same way if you bounce one of the queue managers.

However if a qmgr goes down for a time interval beyond the automatic reconnect from WAS, you will have to restart the MDB service to reconnect to the resource.

Hope this helps.


Hello fjb_saper,

In scenarios like this, is it possible to have each WAS server to put to both qmgrs as well?
I mean, WAS1 puts messeges to QM1 and QM22, and WAS2 puts messages to QM1 and QM2. And same while getting the messages.
If this is possible, can it be achieved from the WAS configuration itself or is any extra coding required. Appreciate your time.
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 » Connection between WAS and MQ using CCDT file
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.