[openamq-dev] round-robin queues

Martin Sustrik sustrik at imatix.com
Wed Feb 13 10:06:22 CET 2008


Hi Terry,

>
> OK, I think we're completely on the same page, and we're all trying to
> minimize the *something*.
>
> Apart from issues with patching OpenAMQ, do you see a problem with the
> following?
>
>     1. Use auto-delete queues.
>
>     2. Have the exchange tell us when a message is unroutable (this seems
>        possible, according to para 1 of p22 of the 0.9 AMQP spec).
>
>     3. Implement Esteve's suggestion to have OpenAMQ do round-robin.
>
>
> This would seem to remove the need for us to maintain an additional db
> table that indicates which queue (or queues) each resource is on. If we
> tried to access a resource that's not available, we'd get a message to that
> effect (i.e., saying that the original message was unroutable). We would
> then arrange for a box to handle the resource and re-send the request. If a
> box serving resources went away completely, we wouldn't (in theory) have to
> do anything at all.
>   
Well, yes, you can do it that way in case you are not interested in 
guaranteed delivery, ie. if you don't care:

1. that messages would be lost when a service instance fails
2. that messages would be round-robined to a non-responsive service 
instances
> The alternative is to do as you suggest, and as we've considered, and
> maintain additional db information ourselves. That's quite a bit more work.
> For example, if a box that's managing a collection of resources goes away,
> something needs to be informed so we can update the table that indicates
> the queue(s) where all the resources on that box can be found. Can AMQP
> help in telling us when a queue is being destroyed due to the consumer
> vanishing? I guess not. 
No it can't.
> If you agree the first solution would work, and if we could get a patch
> into OpenAMQ, the *something* would seem to be significantly smaller (we'd
> then just have to consider not being able to move to qpid or rabbit etc).
> If not, and we had to maintain the patch ourselves, it might be better for
> us just to just do the extra work with our own db.
>
>   
Sure, you can make a patch, if it helps you to do what you need to, 
however, for guaranteed-delivery & AMQP-compatibility concerns, it 
probably won't be included into OpenAMQ trunk. Maybe some kind of add-on 
package...

Martin


More information about the openamq-dev mailing list