# retoor <retoor@molodetz.nl>
from .hub import pubsub
from .service import PubSubService
__all__ = ["pubsub", "PubSubService", "publish"]
async def publish(topic: str, data) -> int:
return await pubsub.publish(
topic, {"type": "message", "topic": topic, "data": data}
)