Author |
Message
|
Dimidrol |
Posted: Wed Jun 24, 2009 8:21 am Post subject: Propogate messages from one local queue to another |
|
|
Newbie
Joined: 24 Jun 2009 Posts: 3
|
Hi guys,
I have the following question.
I'm propagating messages off the Oracle queue into MQ queue via Oracle Messaging Gateway. What I'm trying to do is to avoid adding more queues on Oracle side and add one more queue on MQ's side instead.
If I have two local queues under the same MQ manager, how do I insure that when I add a message to one queue it'll be copied to another? In a nutshell, I would like to be able to have same messages in both queues, but manage those queues separately. Alias queue would not work in this situation. I tried creating a channel, transmission queue, etc.
Thanks for your help. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jun 24, 2009 8:36 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
define a qalias that points to a topic. Send messages from OracleAQ to that qalias.
Register two subscripters to that topic, that point to the two queues you (almost certainly needlessly) want the same message duplicated to.
Or write a small app that reads from one queue and writes to two. |
|
Back to top |
|
 |
Dimidrol |
Posted: Wed Jun 24, 2009 9:38 am Post subject: |
|
|
Newbie
Joined: 24 Jun 2009 Posts: 3
|
So there, still, something has to be done on Oracle side to write to two queues? Isn't there a way in MQ Series itself, to have some kind of a trigger that would write to other queue, as soon as primary queue gets the message? |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jun 24, 2009 9:50 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The only part of what I said needed to occur in Oracle was in the part where you "tell OracleAQ to write to that qalias".
Everything else is done in MQ. |
|
Back to top |
|
 |
shashivarungupta |
Posted: Thu Jun 25, 2009 12:56 am Post subject: |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
If you would have used the WBI MB, then you could have used the PROPAGATE function in ESQL to do the same easily. But I think as per your requirement this would be out of the questions.
mqjeff, said it correctly as solution, at mq level. _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
Dimidrol |
Posted: Thu Jun 25, 2009 4:52 am Post subject: |
|
|
Newbie
Joined: 24 Jun 2009 Posts: 3
|
Is there a way to create a subscriber on MQ? I'm using MQ explorer for everything and I don't see that option there. And 'qalias" is an actual alias of a primary queue, or is it something else? I'm new to this , I'm a bit lost here. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jun 25, 2009 4:55 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You need to be using MQ V7. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jun 25, 2009 5:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
You need to be using MQ V7. |
And reading the documentation, where the various queue types are described. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kenn_ryan |
Posted: Tue Sep 25, 2012 7:01 pm Post subject: |
|
|
Newbie
Joined: 07 Mar 2012 Posts: 9
|
Thanks mqjeff.
We are to implement this kind of setup in one of the environment as the requirement is the same as the TS.
Our concern will be the performance.
Anyone had done this kind of setup and where there additional overhead in terms of performance.
Though we will having performance testing on this, but at least that will give us an idea.
Thanks for the responses. |
|
Back to top |
|
 |
zpat |
Posted: Wed Sep 26, 2012 1:14 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
The MQSC commands to define all the necessary objects for this pub/sub replication were posted here (by me) in another thread. |
|
Back to top |
|
 |
exerk |
Posted: Wed Sep 26, 2012 2:26 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
zpat wrote: |
The MQSC commands to define all the necessary objects for this pub/sub replication were posted here (by me) in another thread. |
And information can also be found HERE. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
zpat |
Posted: Wed Sep 26, 2012 2:55 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Ensure the PSMODE enabled (only need do this once).
ALTER QMGR PSMODE(ENABLED)
Define topic object with fixed topic string (of your choice)
DEFINE TOPIC(TEST.DUP) TOPICSTR('/MQ/DUPLICATE/TEST1') DURSUB(YES) REPLACE
Define topic alias queue using topic object
DEFINE QALIAS(TEST.ALIAS) DEFPSIST(YES) TARGTYPE(TOPIC) TARGET(TEST.DUP) REPLACE
Define local queues to receive the messages (they could also be remote queues as needed)
DEFINE QLOCAL(TEST.QUEUE1) DEFPSIST(YES) REPLACE
DEFINE QLOCAL(TEST.QUEUE2) DEFPSIST(YES) REPLACE
Define admin durable subscriptions
DELETE SUB(TEST.SUB1)
DEFINE SUB(TEST.SUB1) DEST(TEST.QUEUE1) TOPICOBJ(TEST.DUP) PSPROP(NONE)
DELETE SUB(TEST.SUB2)
DEFINE SUB(TEST.SUB2) DEST(TEST.QUEUE2) TOPICOBJ(TEST.DUP) PSPROP(NONE)
Now - just put a message to TEST.ALIAS and it should appear on both local queues. |
|
Back to top |
|
 |
kenn_ryan |
Posted: Wed Sep 26, 2012 6:39 pm Post subject: |
|
|
Newbie
Joined: 07 Mar 2012 Posts: 9
|
Thanks for the responses guys,appreciate it.
Able to setup it and make it working.
Any additional comments performance wise for this kind of setup?
We are to implement this on a shared environment and concerned on the performance of the QMGR and server may suffer.
Any performance testing done on this and may want to share? |
|
Back to top |
|
 |
exerk |
Posted: Wed Sep 26, 2012 11:46 pm Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Have a look at the Performance Evaluations/Reports HERE. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
zpat |
Posted: Wed Sep 26, 2012 11:56 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Pub/Sub matching is pretty fast (esp if you don't use pub/sub for other stuff!).
Unless you have massive volumes it's not going to make any difference. |
|
Back to top |
|
 |
|