Author |
Message
|
mandy13 |
Posted: Thu Sep 26, 2013 11:47 pm Post subject: Duplicating Queues |
|
|
Apprentice
Joined: 17 Apr 2013 Posts: 28
|
Hi,
I have 2 queues say Q1 and Q2. When I insert messages using MQPUT into Q1, is there any way that this message be replicated into Q2?
Does WMQ have support for queue copy?
Thanks,
mandy |
|
Back to top |
|
 |
Mr Butcher |
Posted: Fri Sep 27, 2013 1:24 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
no, not directly ...
there is/way something like "mirrorq" around, but i dont know if it applies to api or if it was a channel exit, please check yourself
pub / sub is also a possibility to archieve what you want _________________ Regards, Butcher |
|
Back to top |
|
 |
mandy13 |
Posted: Fri Sep 27, 2013 1:55 am Post subject: |
|
|
Apprentice
Joined: 17 Apr 2013 Posts: 28
|
Just some additional information
The queues reside on separate queue managers.
Thanks,
mandy |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Sep 27, 2013 4:01 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Are the queue managers in the same MQ Cluster or connected with SNDR/RCVR channels?
Define a topic called Q1T, with a topic string of Q1
Define a sub to topic object Q1T, with a destination of Q1
Define a Q Alias called Q1Alias, target type topic with a target of Q1T
A put to Q1Alias will now produce a message to the Q1 local queue
Define another sub to topic object Q1T, this time with a destination of Q2
A put to Q1Alias will now produce 2 messages, one to Q1 and one to Q2.
The only change in the original setup is that App A puts to Q1Alias instead of Q1. App A and App B don't know they are using Pub Sub. The subscriptions are created by the MQ Admin using admin commands. The messages will be copies, but the MQMD_MessageID will be different between the two. _________________ Peter Potkay
Keep Calm and MQ On
Last edited by PeterPotkay on Fri Sep 27, 2013 4:04 am; edited 1 time in total |
|
Back to top |
|
 |
Mr Butcher |
Posted: Fri Sep 27, 2013 4:03 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
well then you need a method to duplicate the messages on qmgr 1 and a connection (remoteq, xmitq, channel) from qmgr 1 to qmgr 2 to send the duplicated message over _________________ Regards, Butcher |
|
Back to top |
|
 |
mandy13 |
Posted: Sun Sep 29, 2013 8:42 pm Post subject: |
|
|
Apprentice
Joined: 17 Apr 2013 Posts: 28
|
Thanks PeterPotkay for your suggestion.
The queue managers are connected with SNDR/RCVR channels.
The problem is app A which reads from Q1 (on Queue Manager QMA) is not able to get the data as Q1 is an alias queue. Q2 (remote queue on Queue Manager QMB) which subscribes to the topic on which Q1 posts is able to get the data. How can app A still get the message from Q1 with Q1 being the only queue on QMA? |
|
Back to top |
|
 |
bruce2359 |
Posted: Sun Sep 29, 2013 9:54 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
mandy13 wrote: |
The problem is app A which reads from Q1 (on Queue Manager QMA) is not able to get the data as Q1 is an alias queue. |
What do you mean by 'as Q1 is an alias queue'?
What what is the TARGET of the alias?
Does app A get an error when it tries? If so, what is the error?
Is app A on the same qmgr as the TARGET of the alias? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
mandy13 |
Posted: Mon Sep 30, 2013 11:37 pm Post subject: |
|
|
Apprentice
Joined: 17 Apr 2013 Posts: 28
|
bruce2359 wrote: |
What do you mean by 'as Q1 is an alias queue'?
|
the data in alias queue gets relayed to a topic and not available for read.
bruce2359 wrote: |
What what is the TARGET of the alias?
|
TARGET of alias is a topic |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue Oct 01, 2013 3:34 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
mandy13 wrote: |
How can app A still get the message from Q1 with Q1 being the only queue on QMA? |
It cannot. Follow my suggestions above. If you make Q1 the Alias that resolves to the topic, you need to make a new queue (lets call it NewQ), make an Administrative subscription to it, and have App A read from NewQ.
If you want App A to read from a queue called Q1, then you need to make the Alias that refers to the TOpic a different name and have the putting app change.
Sorry, either the putter or the original getter needs to change the q name they use if you want to use the method I suggest. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
|