rad
5.1.0
|
Publisher provides the capability to publish protobuf topics over ZMQ. More...
Public Member Functions | |
def | __init__ (self, *str endpoint, zmq.asyncio.Context zmq_ctx, asyncio.AbstractEventLoop loop=None) |
Publisher creates a ZMQ.PUB socket which is bound toendpoint and can be used to publish topics to subscribers. More... | |
def | stop (self) |
Stop publisher. More... | |
asyncio.Future | publish (self, str topic_name, google.protobuf.message.Message topic) |
Publish topic under name topic_name . More... | |
Publisher provides the capability to publish protobuf topics over ZMQ.
def rad.services.pubsub.Publisher.__init__ | ( | self, | |
*str | endpoint, | ||
zmq.asyncio.Context | zmq_ctx, | ||
asyncio.AbstractEventLoop | loop = None |
||
) |
Publisher creates a ZMQ.PUB socket which is bound toendpoint
and can be used to publish topics to subscribers.
ZMQ Protocol is simple and each published topic is sent as 3 ZMQ frames: [<topic_name>, <type_name>, <serialized_type>] where <topic_name> is the user provided name for the topic. <type_name> is the type name that identifies the serialized type. <serialized> is the serialized topic data.
asyncio.Future rad.services.pubsub.Publisher.publish | ( | self, | |
str | topic_name, | ||
google.protobuf.message.Message | topic | ||
) |
Publish topic
under name topic_name
.
Returns Future that resolves once topic has been published.
def rad.services.pubsub.Publisher.stop | ( | self | ) |
Stop publisher.
Closes socket