Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ordering of the messages

  1. Does ZeroMQ guarantee the order of messages( FIFO ).
  2. Is there an option for persistence.
  3. Is it the best fit for IPC communications.
  4. Does it allow prioritizing the messages.
  5. Does it allow prioritizing the receivers.
  6. Does it allow both synchronous as well asynchronous way of communication?
like image 331
PhiberOptixz Avatar asked Oct 16 '12 18:10

PhiberOptixz


2 Answers

https://lists.zeromq.org/pipermail/zeromq-dev/2015-January/027748.html

The author said:"Messages carried over TCP or IPC will be delivered in order if they pass through the same network paths. This is guaranteed and it's a TCP guarantee, nothing to do with ZeroMQ. ZeroMQ does not reorder messages, ever. However if you pass messages through two or more paths, and then merge those flows again, you will in effect shuffle the messages."

like image 90
Jichao Zhang Avatar answered Sep 29 '22 09:09

Jichao Zhang


Zeromq is best understood as a udp like messaging system. Thus is does not intrinsically guarantee any of that. It DOES guarantee that parts of a single message are received atomically and in order, since ZMQ allows for sending a message consisting of several parts. All communication is always asynchronous by design.

see http://zguide.zeromq.org/ for more advanced patterns.

that being said, all the features requested would by definition make the transmission slower and more complicated. If they are needed you should implement or use one of the available patterns of the guide.

like image 41
mgoetzke Avatar answered Sep 29 '22 07:09

mgoetzke