I'm using reactphp/zmq.
How can I have multiple push workers within multiple pull workers, is that possible?
A only can have multi pull and single push, as in README's example:
$push->connect()
$pull->bind()
Or single pull and multi pushes:
$push->bind()
$pull->connect()
When I try to set both as connect
the pulls doesn't receive the messages.
Otherwise, trying to start more than one process with bind
it throws:
ZMQSocketException: Failed to bind the ZMQ: Address in use
Should I have a middleware? ????
(5555) (5556)
push -| (5555) > (5556) |- pull
push -|-> pull & push <- |- pull
push -| bind / bind |- pull
connect connect
TIPC
protocol that makes this easy, but it's probably wiser that you explain what exactly you're trying to do so we can suggest optimal architecture. – Mjhpull
to receive the task andpush
to hand it out to workers. You usepush
to give it tasks andpull
to take tasks from it. – Mjh