On Sat, Jun 1, 2013 at 4:09 AM, crocket <crockabisc...@gmail.com> wrote:
> Imagine a situation where some messages are urgent and need to be delivered > faster than low priority messages. > > ZeroMQ has no notion of message priority. > Is it possible ever? It's possible, it's easy, and it's built-in because ZeroMQ does fair queuing on input, which gives the same result as message priorities with much less complexity. Let's say I have a pub-sub design and want to inject hi-priority messages to subscribers. I'll create two PUB sockets and bind on different endpoints. I use one for normal traffic and one for high-priority messages. Subscribers connect to both endpoints and read from their single SUB socket. You can create as many priority levels as you like. Currently this requires multiple TCP endpoints, but when we get around to implementing ZMTP 3.0 it will work on a single endpoint since that provides resource-based endpoints. E.g. zmq_bind ("tcp://*:9000/urgent") -Pieter _______________________________________________ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev