[zeromq-dev] Multiple sender to Multiple receivers

Martin Sustrik sustrik at fastmq.com
Tue Jul 28 15:51:16 CEST 2009


Ah, I though you specifically wanted to use the shared queue model. 
Brokerless model is the native model of 0MQ so it's even easier to 
accomplish. Each sender defines a global exchange. Each receiver binds 
to all the global exchanges.

Martin

Robert Zhang wrote:
> The broker in the middle solution might not be a good solution in a high 
> throughput/low latency scenario. It's an extra hop and becomes the 
> bottleneck. An example would be multiple publishers sending various 
> streams of market data and many listeners are interested in aggregating 
> all of them. Having a single broker could be bad for scalability. Tibco 
> and 29west all support brokerless model of publishing/subscribing on a 
> given topic with any number of sender/receiver. Do you think this could 
> be supported in the future?
> 
> Thank you,
> Robert
> 
> On Tue, Jul 28, 2009 at 8:19 AM, Martin Sustrik <sustrik at fastmq.com 
> <mailto:sustrik at fastmq.com>> wrote:
> 
>     Hi Robert,
> 
> 
>           I'm new to zmq and after working through the examples, I
>         understand single sender can send to multiple receiver
>         applications by using global exchange bound to multiple local
>         queues. Also multiple senders can send to single receiver by
>         using local exchanges bound to a global queue.
>           How does one setup a multiple sender to multiple receiver
>         scenario? I'm looking for N senders sending messages, M
>         receivers that need to get all the published messages regardless
>         of who the sender is. What would be bind model look like to
>         accomplish this?
> 
> 
>     Have a look at the chat tutorial. It does exactly what you are
>     looking for. The point is to implement a simple application with a
>     global queue to get messages from senders and a global exchange to
>     send messages to receiver apps.
> 
>     Martin
> 
> 
> 
> 




More information about the zeromq-dev mailing list