Channel
A channel that publishes messages to a given 'name' on its own Transport. Default name is "eggai.channel". Lazy connection on first publish or subscription.
Source code in eggai/channel.py
__init__(name='eggai.channel', transport=None)
:param name: Channel (topic) name. :param transport: A concrete transport instance.
Source code in eggai/channel.py
publish(message)
async
subscribe(callback)
async
Subscribe to this channel by registering a callback to be invoked on message receipt.
:param callback: An asynchronous function that takes a message dict as its parameter.