[zeromq-dev] Is it possible to add message priority on top of ZeroMQ?
Apostolis Xekoukoulotakis
xekoukou at gmail.com
Sat Jun 1 07:06:48 CEST 2013
Yea, I do something similar here. I drop messages till I have almost zero
queue size in one socket, and I prioritize that socket with the poller, ie
I process the other socket only if there is no msg in the primary socket.
I excessivelly check the time before and after the poll to find whether we
waited at the poll for some time and I use that to adjust the drop rate of
messages.
https://github.com/xekoukou/PlatanosPriorityPoll
I wonder though when the ZMQ_POLLOUT is triggered.
When does this happen?
"*ZMQ_POLLOUT*
For ØMQ sockets, at least one message may be sent to the *socket* without
blocking. For standard sockets this is equivalent to the *POLLOUT* flag of
the *poll()* system call and generally means that at least one byte of data
may be written to *fd* without blocking.
"
Is it when the network is saturated? If so, we could use that to prioritize
at the originating computer, by using 2 queues again.
2013/6/1 Joshua Foster <jhawk28 at gmail.com>
> I usually implement this with multiple sockets. You can then use the
> poller to priorities the messages from another socket.
>
> Joshua
>
> crocket <crockabiscuit at gmail.com>
> Friday, May 31, 2013 10:09 PM
> 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?
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
--
Sincerely yours,
Apostolis Xekoukoulotakis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130601/02d64b12/attachment.htm>
More information about the zeromq-dev
mailing list