Receive topic-prefixed JSON messages using a thread-owned SUB socket. More...
Public Member Functions | |
| None | subscribe (self, str topic) |
| Subscribe to a topic or transport-specific topic prefix. | |
| tuple[str, Mapping[str, Any]] | receive (self) |
| Block until one encoded message is received. | |
| None | close (self) |
| Release subscriber resources when the implementation owns any. | |
Receive topic-prefixed JSON messages using a thread-owned SUB socket.
Topic subscriptions may be registered before reception starts. The actual ZeroMQ context and socket are created lazily by the thread that first calls :meth:receive, preserving ZeroMQ socket thread affinity.
| tuple[str, Mapping[str, Any]] messaging.zeromq.subscriber.ZeroMqSubscriber.receive | ( | self | ) |
Block until one encoded message is received.
Reimplemented from messaging.subscriber_if.SubscriberIf.
| None messaging.zeromq.subscriber.ZeroMqSubscriber.subscribe | ( | self, | |
| str | topic | ||
| ) |
Subscribe to a topic or transport-specific topic prefix.
| topic | Public topic name or supported transport-specific prefix. |
Reimplemented from messaging.subscriber_if.SubscriberIf.