pub fn message_bus_init_tokio(server: String) {
    NATS_MSG_BUS.get_or_init(|| {
        // Waits for the message bus to become ready
        tokio::runtime::Handle::current().block_on(async {
            NatsMessageBus::new(
                &server,
                BusOptions::new(),
                TimeoutOptions::new(),
            )
            .await
        })
    });
}
/// Initialise the Nats Message Bus with the current tokio runtime
/// (the runtime MUST be setup already or we will panic)
Initialise the Nats Message Bus with the current tokio runtime
(the runtime MUST be setup already or we will panic)
Initialise the Nats Message Bus with the current tokio runtime ( the runtime MUST be setup already or we will panic )
pub fn message_bus_init_tokio(server: String) {
    NATS_MSG_BUS.get_or_init(|| {
        // Waits for the message bus to become ready
        tokio::runtime::Handle::current().block_on(async {
            NatsMessageBus::new(
                &server,
                BusOptions::new(),
                TimeoutOptions::new(),
            )
            .await
        })
    });
}
pub fn message_bus_init_tokio ( server : String ) { NATS_MSG_BUS . get_or_init ( | | { // Waits for the message bus to become ready tokio :: runtime :: Handle :: current ( ) . block_on ( async { NatsMessageBus :: new ( & server , BusOptions :: new ( ) , TimeoutOptions :: new ( ) , ) . await } ) } ) ; }
Initialise the Nats Message Bus with the current tokio runtime
(the runtime MUST be setup already or we will panic)
Initialise the Nats Message Bus with the current tokio runtime ( the runtime MUST be setup already or we will panic )
server
String