Author |
Message
|
paustin_ours |
Posted: Fri Sep 12, 2014 1:15 pm Post subject: find the original queue name from alias queue msg |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
Is there a way to get the original queue name from message
Read from alias queue?
The message mqmd has the alias queue name but I need to find
The original queue so I can do some routing based on it |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Sep 12, 2014 1:18 pm Post subject: Re: find the original queue name from alias queue msg |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
paustin_ours wrote: |
Is there a way to get the original queue name from message
Read from alias queue?
The message mqmd has the alias queue name but I need to find
The original queue so I can do some routing based on it |
Why not do the routing base on the Alias queue name? There might be a difference as to quality of service, size of the messages allowed. etc...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
paustin_ours |
Posted: Fri Sep 12, 2014 1:31 pm Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
OP is wrong sry, let me try this again.
Apps write to 10 different alias queues for example and they all point to
The same base queue read by a msgflow. The message read in the flow has the base queue name in the mqmd. I need the alias queue name and do some
Routing and enhancements based on that queue. |
|
Back to top |
|
 |
ryan_brdk |
Posted: Fri Sep 12, 2014 5:10 pm Post subject: |
|
|
Newbie
Joined: 07 Sep 2014 Posts: 1
|
also is there an option in iib9 where you can have one mqinput node but make it read from a bunch of queues?
there is very little mention on the integration registry, MQ service
not much details on what it can and can't do in the infocenter. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Sep 15, 2014 5:17 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
ryan_brdk wrote: |
also is there an option in iib9 where you can have one mqinput node but make it read from a bunch of queues? |
No.
You should otherwise look at the 'source queue' property set in the tree after the MQInput node fires. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Sep 15, 2014 5:44 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
paustin_ours wrote: |
I need the alias queue name and do some
Routing and enhancements based on that queue. |
You can't obtain it. There's no way for IIB or any other application to determine from a message on a queue if the message was put directly or via an alias. Indeed, there's no way to determine if you're reading the message from a local queue or an alias queue.
You'll need to look at the message data to tell them apart. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Mon Sep 15, 2014 5:47 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
A message does not contain its own queue name in the MQMD. There should be an application name in the MQMD, which may help.
Detecting which queue alias it came from is not possible unless the putting application has recorded it somewhere in the message.
You can have more than one queue as input to a flow - just by using multiple MQ input nodes. Then you would know which queue it arrived from (instead of using aliases). _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
 |
vicentius |
Posted: Mon Sep 15, 2014 9:50 pm Post subject: |
|
|
 Apprentice
Joined: 01 Mar 2013 Posts: 28
|
Regarding the MQInput node, it cannot listen to multiple queues. For each MQInput in your flow, a thread exists that binds to the configured queue.
Regarding the routing problem you mentioned:
Can the sending application register the name of the queue where it puts the message in the jms.Dst header? If so, then MQ will do its magic to move the message through aliases, but you will still have the original queue name.
Another solution would be to have a different "Dispatcher" flow, with MQInput nodes for each queue in your scenario. Having access to the source queue, you can implement the routing in this flow, sending the messages via MQOutput to the queue your original flow listens to. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Sep 16, 2014 4:38 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
zpat wrote: |
A message does not contain its own queue name in the MQMD. |
It does if it's been read off by an MQInput node in WMB / IIB, which is the case here.
zpat wrote: |
You can have more than one queue as input to a flow - just by using multiple MQ input nodes. Then you would know which queue it arrived from (instead of using aliases). |
Which would work, given the trade off of 10 actual queues instead of 1 queue and 9 pointers & the extra threads the flow would consume. I'd still go by message content; the putting application field in the MQMD too often shows "Java", which is less than distinctive. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|