[rabbitmq-discuss] Help defining appropriate queue model

Alexis Richardson alexis at rabbitmq.com
Wed Mar 2 16:36:57 GMT 2011


Fabio

On Wed, Mar 2, 2011 at 4:30 PM, Fabio Margarido
<fabiomargarido at gmail.com> wrote:
> Forgot to copy the list.
>
> Hi Alexis, thank you for the link.
> It answers some of my doubts, but there are still some bits I don't
> understand. For example, the page says: "The messages will be lost if
> no queue is bound to the exchange yet, but that's okay for us; if no
> consumer is listening yet (i.e., the exchange hasn't been created) we
> can safely discard the message.". That's not the case for me; what I
> wanted to do is publish once and consume as many times as necessary.

In the link I sent, you publish once per update, independent of the
number of consumers.


> The scenarios I can't quite grasp yet are:
>
> * The producer publishes the message before any consumers are running;

Do you want a new consumer to see all old updates, or just the latest
update that occurred before the new consumer connects to the broker?

> * The consumer receives the message, dies and reboots, consumes the
> same message once more.

You can set things up so that the message gets requeued, but not 'in order'.

I'd tentatively suggest that you may be talking more about a cache
than message queue.

alexis



> Are these even possible?
> Thanks again.
>
> On Wed, Mar 2, 2011 at 11:20, Alexis Richardson <alexis at rabbitmq.com> wrote:
>> Fabio
>>
>> The simplest way is probably as follows:
>>
>> http://www.rabbitmq.com/tutorial-three-python.html
>>
>> Note that each consumer has its own queue, which acts as a buffer on
>> behalf of that consumer.  The downside of this is a slow consumer may
>> get several configuration updates at once, so it will need to discard
>> the earlier ones but should act on the latest.
>>
>> alexis
>>
>>
>> On Wed, Mar 2, 2011 at 2:14 PM, Fabio Margarido
>> <fabiomargarido at gmail.com> wrote:
>>> Hi there,
>>> I'm about to use RabbitMQ in my first amqp project and am having a bit
>>> of difficulty identifying the necessary queues and exchanges.
>>> In our use case, there will be only one producer who publishes a
>>> message to the broker. This message represents configuration data.
>>> Then multiple consumers read the published configuration from the
>>> broker during their startup process, so it shouldn't happen very
>>> often. The message should remain in the queue after consumption so
>>> that the following consumers are able to read it. When some
>>> configuration data changes, the producer republishes it and alerts
>>> (possibly through some other queue) the consumers, who then read the
>>> configuration message again.
>>> I know this question isn't exactly related to RabbitMQ, but reading
>>> the AMQP spec didn't help much. Could anyone help me identify which
>>> exchange types, queue and message parameters I need for this to work?
>>> Thanks in advance.
>>>
>>> Fabio.
>>> _______________________________________________
>>> rabbitmq-discuss mailing list
>>> rabbitmq-discuss at lists.rabbitmq.com
>>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>>>
>>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>


More information about the rabbitmq-discuss mailing list