Function fluvio::producer [−][src]
pub async fn producer<S: Into<String>>(
topic: S
) -> Result<TopicProducer, FluvioError>
Creates a producer that sends events to the named topic
This is a shortcut function that uses the current profile
settings. If you need to specify any custom configurations,
try directly creating a Fluvio
client object instead.
Example
let producer = fluvio::producer("my-topic").await?; producer.send_record("Hello, world!", 0).await?;