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 » WebSphere Message Broker (ACE) Support » Setting the queue name in MQInput node dynamically

Post new topic  Reply to topic Goto page 1, 2  Next
 Setting the queue name in MQInput node dynamically « View previous topic :: View next topic » 
Author Message
krypton
PostPosted: Wed May 12, 2010 2:07 am    Post subject: Setting the queue name in MQInput node dynamically Reply with quote

Disciple

Joined: 14 Mar 2010
Posts: 186

Starting with the IBM documentation - http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=/com.ibm.etools.mft.doc/ab67750_.htm and later googling in MQseries.net for some time, I am "unable" to find anywhere the details about how to set the MQInput Queue name property dynamically. Till now we are specifying the input queue name in the Node level itself. Is there any way we can set this property dynamically as we are planning to pick all the node configurable propeties from a properties file or from a database, So that it BAR file would be movable from one environment to another (DEV->SIT->UAT->Pre-PROD->PROD) without making changes in it.

As the queue name property of MQInput node is Mandatory, we can set it to some default value and later it gets picked up from the database dynamically.

We can do so beautifully in MQOutput node, but there seems to be no feature in case of MQInput node. Is it available in V7, we are currently running V6.1 of Message Broker.
_________________
Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep.
Back to top
View user's profile Send private message
fatherjack
PostPosted: Wed May 12, 2010 2:30 am    Post subject: Reply with quote

Knight

Joined: 14 Apr 2010
Posts: 522
Location: Craggy Island

This is a very odd 'requirement'. But assuming it is a valid one (which I doubt) where are you planning to dynamically change the queue name anyway. The MQInput node has no input terminal so you won't be able to put any node in front of it in your flow where you could change the queue name.

There's rarely any good reason for queue names to change between environment. It's the queue manager that typically changes. So same flow, same queue name, same bar file, just deployed somewhere else.
_________________
Never let the facts get in the way of a good theory.
Back to top
View user's profile Send private message
Esa
PostPosted: Wed May 12, 2010 2:31 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

This problem is solved by using an alias queue as the input queue.
Back to top
View user's profile Send private message
fatherjack
PostPosted: Wed May 12, 2010 2:37 am    Post subject: Reply with quote

Knight

Joined: 14 Apr 2010
Posts: 522
Location: Craggy Island

Esa wrote:
This problem is solved by using an alias queue as the input queue.


Absolutely and this is indeed using the right tool for the job, but Krypton seems to be saying he wants to pick up the queue name dynamically at run time from a properties file or database, so presumably he would still want to pick up the QALIAS name dynamically at run time. But as I said, what an odd 'requirement'.
_________________
Never let the facts get in the way of a good theory.
Back to top
View user's profile Send private message
krypton
PostPosted: Wed May 12, 2010 2:52 am    Post subject: Reply with quote

Disciple

Joined: 14 Mar 2010
Posts: 186

fatherjack wrote:

Quote:
It's the queue manager that typically changes. So same flow, same queue name, same bar file, just deployed somewhere else.


Queue Name will change based on the environment as the naming convention for a queue have environment details as well.



Quote:
fatherjack wrote:But assuming it is a valid one (which I doubt)


it is a valid request.
Quote:

Esa Wrote: This problem is solved by using an alias queue as the input queue.

How can we specify the MQInput node queue name property as Alias queue, it must be a local queue(target queue). correct?
_________________
Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep.
Back to top
View user's profile Send private message
zpat
PostPosted: Wed May 12, 2010 2:53 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

An alias queue can normally be specified anywhere that a queue name is wanted.

It is resolved to the underlying queue when it is opened.

WMB will open the queue when the flow is deployed and wait for messages to arrive before invoking the flow.

Incidentally each input node (if more than one is used) causes a new flow instance to be created automatically.
Back to top
View user's profile Send private message
jsware
PostPosted: Wed May 12, 2010 2:56 am    Post subject: Re: Setting the queue name in MQInput node dynamically Reply with quote

Chevalier

Joined: 17 May 2001
Posts: 455

krypton wrote:
So that it BAR file would be movable from one environment to another (DEV->SIT->UAT->Pre-PROD->PROD) without making changes in it.
You can promote the MQInput node property to the flow level and then use mqsiapplybarfileoverride as you deploy it in an environment. You can't set a configurable service and have the MQInput node look that up like the other input nodes (HTTPInput et al).

I can see a need here to define a generic flow that can then be deployed to read from different input queues to perform the same function. For example, a Wire Tap flow to copy a message from an input queue to an output queue and save a copy of the message to a wiretap queue. You then deploy this flow multiple times, specifying input/output/wiretap queues at deployment time.
_________________
Regards
John
The pain of low quaility far outlasts the joy of low price.
Back to top
View user's profile Send private message
fatherjack
PostPosted: Wed May 12, 2010 3:11 am    Post subject: Reply with quote

Knight

Joined: 14 Apr 2010
Posts: 522
Location: Craggy Island

krypton wrote:

Quote:
fatherjack wrote:But assuming it is a valid one (which I doubt)


it is a valid request.


Just to clarify, what I was doubting was the 'requirement' to pick up the queue name dynamically at runtime from an external source, rather than the requirement to have different queue names per environment.

There are a number of ways, some already mentioned in this post to support this requirement, but I doubt there is any to supoort your 'requirement'.
_________________
Never let the facts get in the way of a good theory.
Back to top
View user's profile Send private message
krypton
PostPosted: Wed May 12, 2010 3:21 am    Post subject: Reply with quote

Disciple

Joined: 14 Mar 2010
Posts: 186

Quote:
An alias queue can normally be specified anywhere that a queue name is wanted.

It is resolved to the underlying queue when it is opened.

WMB will open the queue when the flow is deployed and wait for messages to arrive before invoking the flow.

Incidentally each input node (if more than one is used) causes a new flow instance to be created automatically.


What I understand regarding the use of Alias queue is suppose A is the alias queue and X is the target queue for an environment, so we can define "QueueName" property of the MQInput Node as X, we can not define it "A"(correct me if I am wrong).. Now keep the X as constant across all environment and keep changes the name of the Alias queue as A, B, C..D etc.. so in these cases atleast BAR file wouldnt need to be changed across environment.

Although I think I am defeating the overall purpose of Alias queue, because alias queue is being used to change the name of Target queue from environment to environment without letting the application team know.
_________________
Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep.
Back to top
View user's profile Send private message
fatherjack
PostPosted: Wed May 12, 2010 3:29 am    Post subject: Reply with quote

Knight

Joined: 14 Apr 2010
Posts: 522
Location: Craggy Island

krypton wrote:

What I understand regarding the use of Alias queue is suppose A is the alias queue and X is the target queue for an environment, so we can define "QueueName" property of the MQInput Node as X, we can not define it "A"(correct me if I am wrong).


You're wrong. You can set the queue name to an alias queue.
_________________
Never let the facts get in the way of a good theory.
Back to top
View user's profile Send private message
krypton
PostPosted: Wed May 12, 2010 4:20 am    Post subject: Reply with quote

Disciple

Joined: 14 Mar 2010
Posts: 186

fatherjack wrote:
Quote:
You're wrong. You can set the queue name to an alias queue.


What I understand is an Alias queue points to a target queue, so if you put any message in the alias queue it will go immediately to Target queue.

Now, if I set the Queue Name property of MQInput Node to Alias queue, how it is going to pick the message for processingm, as message will never come to Alias queue, it will automatically will route to Target Q.
_________________
Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed May 12, 2010 4:24 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You can not do anything with a queue without opening it first.

MQ name resolution occurs during MQOPEN.
Back to top
View user's profile Send private message
zpat
PostPosted: Wed May 12, 2010 4:34 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

An alias queue does not hold messages. It is merely another way to refer to a local or remote queue.

The alias queue can also be used to provide alternate values for default persistence, message priority, get/put enable etc.
Back to top
View user's profile Send private message
fatherjack
PostPosted: Wed May 12, 2010 4:36 am    Post subject: Reply with quote

Knight

Joined: 14 Apr 2010
Posts: 522
Location: Craggy Island

krypton wrote:
message will never come to Alias queue, it will automatically will route to Target Q.


An alias queue is just that - an alias to a real queue. So when your MQInput node points to an alias queue it is actually pointing to the real target queue defined in the alias qdef.
_________________
Never let the facts get in the way of a good theory.
Back to top
View user's profile Send private message
krypton
PostPosted: Wed May 12, 2010 5:02 am    Post subject: Reply with quote

Disciple

Joined: 14 Mar 2010
Posts: 186

Thanks to everyone, seems using an ALIAS queue is a sound option. we will go ahead with that

Moving this topic to a new thread

http://www.mqseries.net/phpBB2/viewtopic.php?p=276778#276778

We are also trying to do the same for JMSOuput Node, again the IBM documentation says about setting the JMS Destionation List dynamically.

Quote:
SET OutputLocalEnvironment.Destination.JMSDestinationList.DestinationData[1] = 'jndi://TestDestQueue1';


But, what about rest of the properties in a JMSOutput Node i.e. JMS Provider Name, Initial Context Factory, Location JNDI Bindings, Connection Factory Name. Can we set all of these dynamically??
_________________
Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep.


Last edited by krypton on Wed May 12, 2010 7:23 pm; edited 1 time in total
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 » WebSphere Message Broker (ACE) Support » Setting the queue name in MQInput node dynamically
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.