[rabbitmq-discuss] Recommended python library for simple use?

Ben Hood 0x6e6562 at gmail.com
Fri Sep 4 05:26:54 BST 2009


Allen,

On Fri, Sep 4, 2009 at 1:14 AM, Allen Fowler<allen.fowler at yahoo.com> wrote:
> More concerned with configuration, than installation.  Is it a big deal?

Depends what you want to configure. Most of the configuration can be
achieved with the rabbitmqctl tool.

> That's ampqlib, right?

Yep.

> The one-and-only producer, I had thought, would do something like sleep for a few seconds, query the queue size, and if it's getting low, generate a new block of tasks.

How are you going to do this from the client?

> Is this not advisable in RabbitMQ based systems?

Provided you can answer the question above (which incidentally does
have a solution) then I don't see this being an issue per se. From an
architectural perspective you might say that it couples producers and
consumers, which is what a consumer driven message broker tries to
avoid in general. It could also be argued that it makes multicasting
more difficult since you would be bypassing the exchange concept. But
consumers can share queues as well, which might actually what you want
in your use case.  And, you could always architect in some kind of
command mechanism that abstracts out the queue control from the
producers.

> Basically most tasks only need to be done in a "loose FIFO" manner.   Some tasks will wind up sharing a particular attribute, and so their relative order must be followed.  The pool of possible values for this attribute is unlimited, but for any given task block, about 1/3 will share the attribute value with at least one other task.

If your tasks were expressible as numeric priorities and Rabbit
actually implemented priorities, then that might be a option. But
unfortunately it doesn't yet. If you can get away with a priority
queue, you could always put one into your consumer and then set a
larger prefetch window so that the PQ in your app has more than one
message to prioritize.

HTH,

Ben




More information about the rabbitmq-discuss mailing list