[][src]Function pulsar_sys::pulsar_producer_send_async

pub unsafe extern "C" fn pulsar_producer_send_async(
    producer: *mut pulsar_producer_t,
    msg: *mut pulsar_message_t,
    callback: pulsar_send_callback,
    ctx: *mut c_void
)

Asynchronously publish a message on the topic associated with this Producer.

This method will initiate the publish operation and return immediately. The provided callback will be triggered when the message has been be accepted and persisted by the broker. In case of errors, the client library will try to automatically recover and use a different broker.

If it wasn't possible to successfully publish the message within the sendTimeout, the callback will be triggered with a Result::WriteError code.

@param msg message to publish @param callback the callback to get notification of the completion