views:

98

answers:

1

What's the standard wisdom and considerations for dividing up a message queue?

Assuming relatively small number of messages (< 1000/day), does it make sense to combine multiple message types into a single queue and have consumers use selectors to filter them? Or, should a single queue only handle a single message type?

A couple of possible considerations I can think of:

  • At least in my limited knowledge of ActiveMQ, it looks like Read/Write security is per queue. So message types that need different Read/Write permissions would need different queues.
  • Message Selectors would seem to need a standard header value (MessageType: AbcMessage) to filter on
  • An explosion of queues (> 10, > 100, > 1000?) seems to impact performance more than an explosion of messages
  • A single message type per queue would seem to be easier to write client code for. Just process each message on the queue. If you want a different message type, subscribe to a different queue.
  • ???
A: 

Any given MQ system should be able to handle many millions of messages in any given queue, I would not be concerned at all at voume.

I prefer queues that have distinct real-world meaning rather than worrying about selectors. I know there are real reasons to use selectors or to consume and re-queue, but I prefer to make the queues distinct and not worry about selection.

Xepoch