Homunculus Reticulli
Homunculus Reticulli

Reputation: 68476

zeromq request/response example showing use of a queue in Python?

Can anyone please post a Python example that demonstrates the use of a request/response messaging model that utilizes the zeromq queue?.

I have done a lot of online searching but have not as yet been able to locate such an example. The article here does a great job of explaining the concept of the queue, but unfortunately, does not provide an example.

Upvotes: 1

Views: 5984

Answers (1)

Michael Dillon
Michael Dillon

Reputation: 32392

You will find several examples here http://zguide.zeromq.org/page:all#Chapter-Four-Reliable-Request-Reply

Most of the patterns have a source code example of a client app and a server app in several languages. Even when there is a Python source code example, I find it useful to look at the C source code version to fully understand how it works.

I have made use of the Lazy Pirate pattern http://zguide.zeromq.org/py:lpclient and from memory, I had to change something about the way it loops and retries in order to get it to work reliably for me. It wasn't hard to figure out; I just added a few more print statements to see what was going on.

Upvotes: 4

Related Questions