Function subscribe
Source pub async fn subscribe<F, R>(topic: &str, consumer: F)
Expand description
Subscribes to messages on a specific topic.
§Arguments
topic - Message topic
consumer - A callback function to process incoming messages from the topic.
§Examples
zimq::subscribe("user", user_consume).await;
async fn user_consume(msg: Message) {
}