[rabbitmq-discuss] Publish messages only when needed ?

Romain Conseil romain.conseil at gmail.com
Fri Oct 8 10:27:43 BST 2010


Ok,
Thanks for this Idea and the time spent, i will try to implement such an
exchange. Keep you informed !

Cheers
Romain

2010/10/8 Matthias Radestock <matthias at rabbitmq.com>

> Romain,
>
>
> Romain Conseil wrote:
>
>> as you will see in the previous message, I tested the two settings for
>> exchanges (with x-lvc / with direct) : the difference is only 10% oc CPU
>> load and is still at 120% with direct exchanges.
>>
>
> Missed that, sorry. And thinking about it, 120% CPU for a 10kHz publisher
> stream sounds about right - I get similar figures on my machine.
>
>
>  the problem is to have a routeIds list uptodate which requires :
>> - to know the all list of bindings at pblisher startup
>> - to be notify of each new binding when running.
>>
>> Would this be possible ?
>>
>
> You could write a custom exchange type that captures the bind/unbind
> events. It would maintain internal state (in mnesia, perhaps) to count the
> number of bindings per routeId. Whenever that count transitions between zero
> and non-zero it would publish an message to an exchange, with the routeId as
> the routing key.
>
> Producers could then bind to that exchange to receive a stream of
> bind/unbind events relevant to them. And making that exchange an lvc
> exchange allows new producers to learn about the current state.
>
>
> Regards,
>
> Matthias.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20101008/7b8f2d7e/attachment.htm>


More information about the rabbitmq-discuss mailing list