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 » IBM MQ Java / JMS » MQ7 - Routing - JMS

Post new topic  Reply to topic
 MQ7 - Routing - JMS « View previous topic :: View next topic » 
Author Message
gundakiran
PostPosted: Fri Jan 27, 2012 12:03 pm    Post subject: MQ7 - Routing - JMS Reply with quote

Newbie

Joined: 27 Jan 2012
Posts: 4

Hi, I have a requirement and I am trying to see if MQ has any feature to meet the requirement.

Requirement is that -
(1) There is an inbound queue say "inbound.q"
(2) Message has an header say "statename", which will have values like AL, IL etc.
(3) There are queues like 'AL.outbound.q' and 'IL.outbound.q'

The requirement is when we put the message in 'inbound.q' and I need that message 'moved'(forwarded) to AL.outbound.q or IL.outbound.q based on message header 'statename'.

I have an option - to create an MDB (JMS - Java) for inbound.q which will put the message in outbound queues based on queue name.

But I am exploring if there is an MQ feature that will do this for me automatically? If not, does JMS give best performance?

We have MQ7.

Appreciate your inputs,
Thanks, Kiran
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jan 27, 2012 12:23 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

One possibility that occurs to me is rather than putting it to a central inbound queue with a property set to the state name, publish the message with a topic string that contains the state name & establish subscriptions that point to the required target queues.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
gundakiran
PostPosted: Fri Jan 27, 2012 12:37 pm    Post subject: Reply with quote

Newbie

Joined: 27 Jan 2012
Posts: 4

Thank you Vitor for your input.

Assume that we get a million messages a day in an 'inbound.q' and there are 50 outbound queues one per each state, and each message will go to only one of the outbound queues. If we create 50 subscriptions on inbound.q, will the performance/throughput be better than point-to-point with routing component?

Thanks again, Kiran
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jan 27, 2012 12:51 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

gundakiran wrote:
If we create 50 subscriptions on inbound.q, will the performance/throughput be better than point-to-point with routing component?


That's not what I said or what I meant. I advocated the elimination of inbound.q & the creation of 50 durable subscriptions at the same time (and possibly in the same script) as the 50 local queues are created.

As to the performance. In the solution you propose you will have:

- 1 put operation to place the message on inbound.q
- 1 get operation to remove the message from the queue
- some small time to parse the message and obtain the state
- 1 put operation to place it on <statename>.inbound.q

In the pub/sub model you have:

- 1 put operation to place the message on <statename>.inbound.q

That's got to save you some time.

But given 1,000,000 messages per day & assuming you mean an 8 hour business day, that's 125,000 per hour -> 2083 per minute -> 34 per second. Which isn't all that much.

So provided you have semi-decent hardware & a properly tuned queue manager either solution should give you the throughput you need. Pub/sub eliminates the need for code (and somewhere to run it) which was your original question.

Also your design turns inbound.q into a bottleneck as 1 million messages a day are added & removed. Even if they're not persistent, the file handle for that queue will be warm to the touch after a while with all that I/O.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
gundakiran
PostPosted: Fri Jan 27, 2012 1:23 pm    Post subject: Reply with quote

Newbie

Joined: 27 Jan 2012
Posts: 4

Thanks Again. I am sorry I didn't articulate my question correctly.

My big picture is I have 50 inbound queues and 50 outbound queues.

For example:

- inbound queues (we get the messages from our partners - one queue per each partner. From partner point of view this is a REMOTE queue for him)
AL.INBOUND.Q
IL.INBOUND.Q

- outbound queues (these queues are Remote Queues from my application statndpoint)
AL.OUTBOUND.Q
IL.OUTBOUND.Q

If a message comes to AL.INBOUND.Q with statename 'IL' then I should only need to send to IL.OUTBOUND.Q. Any other outbound queues should not receive/see this information.

If it is pub-sub model, each OUTBOUND queue needs to subscribe to ALL inbound queues. And also IF the required OUTBOUND queue is down then that message is lost...

Kiran
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jan 27, 2012 7:11 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Quote:
If it is pub-sub model, each OUTBOUND queue needs to subscribe to ALL inbound queues. And also IF the required OUTBOUND queue is down then that message is lost...

Don't know where you got that idea from.
The topic can be dynamically created depending on message content.
Each outbound queue would only subscribe to its specific (1 ) topic.

However looking at how this would all be setup, and assuming there is no message affinity, in my opinion a solution with a router MDB might be more scalable and ultimately faster than pub/sub.

However pub/sub is more flexible than the afore advocated solution... (what happens when you add a state /county etc...)...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
gundakiran
PostPosted: Mon Jan 30, 2012 6:57 am    Post subject: Reply with quote

Newbie

Joined: 27 Jan 2012
Posts: 4

Thank you
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MQ7 - Routing - JMS
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.