Author |
Message
|
Raj2000 |
Posted: Mon Aug 03, 2009 5:10 pm Post subject: creating queues in message flow |
|
|
 Apprentice
Joined: 03 Aug 2009 Posts: 47
|
is it possible to create local queues on fly in a message flow??
details:
i have a situation where i have to create queues (probably local queues) on fly depending upon some ids?  |
|
Back to top |
|
 |
Vitor |
Posted: Mon Aug 03, 2009 7:46 pm Post subject: Re: creating queues in message flow |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Raj2000 wrote: |
is it possible to create local queues on fly in a message flow?? |
You could create a temporary queue in the usual way.
Raj2000 wrote: |
i have a situation where i have to create queues (probably local queues) on fly depending upon some ids?  |
What you have is a bad design. If you're creating queues like this how will anyone else know what the queue names are? Unless they know the ids, in which case you can create the queues ahead of time. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Gaya3 |
Posted: Mon Aug 03, 2009 9:34 pm Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
if this goes to prodution and assume more than millions of IDs comes...
You queue manager will be populated with Queues.....  _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
marko.pitkanen |
Posted: Mon Aug 03, 2009 11:57 pm Post subject: |
|
|
 Chevalier
Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland
|
|
Back to top |
|
 |
zpat |
Posted: Tue Aug 04, 2009 12:16 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Just say No to this design. |
|
Back to top |
|
 |
Gaya3 |
Posted: Tue Aug 04, 2009 12:35 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
zpat wrote: |
Just say No to this design. |
True...  _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
Raj2000 |
Posted: Tue Aug 04, 2009 1:10 pm Post subject: |
|
|
 Apprentice
Joined: 03 Aug 2009 Posts: 47
|
Hello thank you guys for your support the flow is just in the designing phase. the number of queues that are going to be created(on fly) are going to be limited & unique to each developers workstation and queues are going to created depending upon the unique station id(its a variable like msg id ).
and i am trying to do this :
becoz think of a scenario where i have created only one queue and then all the developers work station have to take the msgs from this queue then they might end up taking the wrong msg (which is of others) IF THEY FORGET TO CONFIGURE MANUALLY THIER APPLICATION TO GRAB THE CORRECT MSG!!
expecting some thoughts on the above issue??
and thanks marko |
|
Back to top |
|
 |
Vitor |
Posted: Tue Aug 04, 2009 1:56 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Raj2000 wrote: |
expecting some thoughts on the above issue?? |
- If the number of workstations is that limited you can create them by hand
- If the queue is created automatically and they forget to manually configure their application you have the same problem
- If the application uses the station id automatically what's going to happen when the application moves out of development and into testing/production? I imagine the number of workstations in production is much larger and don't say "this is for use in development only" - you can't develop one version and then promote another.
Do what the rest of us do - define 1-n development environments and assign them to a developer or a team of developers. If they can't work out which queue that means they'll get the wrong message or no message. They will quickly learn how to work this, or they're so stupid they shouldn't be allowed to develop.
Or stick with this dim design, accept that you'll still get complaints that "WMQ has lost my message/given me the wrong message" but you'll have no control over what's going on or what's being defined. You'll also have to fight off the auditors who are unlikely to be happy with a production environment in which objects can be created ad hoc.
And new ones created by anyone who can spoof a workstation id.
I also wonder how you plan to control security and access in this design? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
murdeep |
Posted: Tue Aug 04, 2009 3:03 pm Post subject: |
|
|
Master
Joined: 03 Nov 2004 Posts: 211
|
In a dev env you should let your developers manage their own queues. This way they can learn as they define, clear etc. Just have them create their own queue that is unique to them.
In all my years I have rarely seen a situation where one developer walked over another, and if they did it's dev so what? |
|
Back to top |
|
 |
jbanoop |
Posted: Tue Aug 04, 2009 4:43 pm Post subject: |
|
|
Chevalier
Joined: 17 Sep 2005 Posts: 401 Location: SC
|
but even if this peculiar requirement is to be implemented, why do you need MB and message flows to do this ?
I think you should go back to the requirements and revisit the design.
What exactly is the high level requirement ?
If you have multiple applications polling on a same queue (like if they all are accessing a common service exposed by MB), then you should make use of some mechanism such as corelation id or browse-inspect-get or something on those lines.
Even if you dynamically create queues, the application(s) would need logic in them to discern that and behave accordingly. I am pretty sure you will run into various issues if you follow that path.
In short, if a single queue needs to be polled by multiple apps, use some corelation mechanism. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Aug 04, 2009 6:17 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
murdeep wrote: |
In a dev env you should let your developers manage their own queues. This way they can learn as they define, clear etc. Just have them create their own queue that is unique to them.
In all my years I have rarely seen a situation where one developer walked over another, and if they did it's dev so what? |
We are on the opposite end of the spectrum. If a developer wants a new queue defined, he/she has to make a request to the MQ Admin stating application that is going to use the queue, purpose of the queue etc...
The queue will then get created and promoted through the environments...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 05, 2009 3:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
FWIW I'm with fjb_saper on this one. It's not so much that developers shouldn't define queues (anything that increases understanding of WMQ is a good thing!) but by routing everything through the WMQ Admin you:
- get to enforce things like naming standards
- get to enforce security (developers sometimes get scripting, authorities often end up as +all!)
- avoid surprises with missing queue objects in environments past dev
My 2 cents, other strategies equally valid and possibly more appropriate in other circumstances, etc, etc.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|