Aggregate logs from Apps, sensors, robots, drones, …
Distributed data streaming platform.
Fluvio is a low latency distributed data streaming platform that connects producers and consumers across data silos, tools, and apps.
Sign-up for Fluvio Cloud or install Fluvio locally, choose an API - Node, Rust, Python - and roll out your first real-time data streaming service.
Producer
const fluvio = await Fluvio.connect();
const producer = await fluvio.topicProducer('greetings');
await producer.send("Hello", "World! 🎉");
let producer = fluvio::producer("greetings").await?;
producer.send("Hello", "Fluvio!").await?;
fluvio = Fluvio.connect()
producer = fluvio.topic_producer("greetings")
producer.send("Hello", "World! 🎉"))
Consumer
const fluvio = await Fluvio.connect();
const consumer = await fluvio.partitionConsumer('greetings', 0);
const stream = await consumer.createStream(Offset.FromBeginning());
for await (const record of stream) {
const key = record.keyString();
const value = record.valueString();
console.log(`Consumed record: Key=${key}, value=${value}`);
}
let consumer = fluvio::consumer("greetings", 0).await?;
let mut stream = consumer.stream(Offset::beginning()).await?;
while let Some(Ok(record)) = stream.next().await {
let key_bytes = record.key().unwrap();
let key = String::from_utf8_lossy(key_bytes).to_string();
let value = String::from_utf8_lossy(record.value()).to_string();
println!("Consumed record: Key={:?}, value={}", key, value);
}
from fluvio import (Fluvio, Offset)
consumer = fluvio.partition_consumer("greetings", 0)
for i in consumer.stream(Offset.beginning()):
key = i.key_string()
value = i.value_string()
print("Consumed record: Key=%s, value=%s" % (key, value))