10 #include <framework/pcore/zmq/connections/ZMQConnection.h>
11 #include <framework/pcore/zmq/utils/ZMQParent.h>
13 #include <framework/pcore/zmq/messages/ZMQIdMessage.h>
14 #include <framework/pcore/zmq/messages/ZMQNoIdMessage.h>
44 const std::shared_ptr<ZMQParent>& parent);
74 ZMQLoadBalancedOutput(
const std::string& outputAddress,
bool lax,
const std::shared_ptr<ZMQParent>& parent);
88 void handleEvent(std::unique_ptr<ZMQNoIdMessage> message);
Specialized connection over a ZMQ socket.
Output part of a load-balanced connection.
std::set< std::string > m_allWorkers
All ever registered inputs.
bool m_sentTerminateMessages
Did we already sent a terminate message?
ZMQLoadBalancedOutput(const std::string &outputAddress, bool lax, const std::shared_ptr< ZMQParent > &parent)
Create a new load-balanced output and bind to the given address.
void handleIncomingData()
Block until a ready message from an input is received and add it to the ready queue.
bool m_lax
Parameter to enable lax mode.
std::deque< std::string > m_readyWorkers
List of identities of ready inputs in LIFO order.
bool isReady() const final
If lax mode is disabled, the output is ready if at least a single input is ready. Else always.
void clear()
Clear the counter for sent stop and terminate messages. Should be called on run start.
void handleEvent(std::unique_ptr< ZMQNoIdMessage > message)
Send the given message (without identity) to the next input in the ready list.
bool m_sentStopMessages
Did we already sent a stop message?
Abstract base class for different kinds of events.