user911651
user911651

Reputation:

Does ZeroMQ ROUTER socket maintain order when using TCP as transport?

I went through some examples using ZeroMQ and found this asynchronous messaging example using a ROUTER socket at the frontend of the server. The documentation states that on incoming requests this socket type will "fair-queue" incoming requests. However, if TCP is used, does that socket maintain order of incoming requests from the same client? For example if client A sends a Message M1 and then M2, the socket will forward M2 after M1 right?

Upvotes: 2

Views: 597

Answers (1)

Trevor Bernard
Trevor Bernard

Reputation: 992

Yes, you can assume that the ordering a client ØMQ sends messages will be received in the same order on the other side. Conceptually, you think of ØMQ Sockets as a message queue.

http://www.aosabook.org/en/zeromq.html#fig.zeromq.arch

Upvotes: 1

Related Questions