bec_lib.connector.PubSubInterface#
- class PubSubInterface[source]#
Bases:
ABC
PubSubBase defines the interface for a pub/sub connector
Methods
Poll for new messages, receive them and execute callbacks
Send a raw message without using the BECMessage class
Register a callback for a topic or pattern
Send a message
Unregister a callback for a topic or pattern
- abstract poll_messages(timeout=None)[source]#
Poll for new messages, receive them and execute callbacks
- abstract raw_send(topic: str, msg: bytes) None [source]#
Send a raw message without using the BECMessage class
- abstract register(topics=None, patterns=None, cb=None, start_thread=True, **kwargs)[source]#
Register a callback for a topic or pattern
- abstract send(topic: str, msg: BECMessage) None [source]#
Send a message