Open
Description
Looking to add a fix or get clarification on how to use example at example-projects/rdkafka-example
let message_record =
MessageRecord::from_event(event).expect("error while serializing the event");
let delivery_status = producer
.send(
FutureRecord::to(topic_name)
.message_record(&message_record)
.key(&format!("Key {}", i)),
Duration::from_secs(10),
)
.await;
- Producer example is attempting to use MessageRecord to serialize events and send directly to Kafka.
- The FutureRecord types however requires a payload that implements ToBytes. MessageRecord doesn't have an impl for this
- It does have a payload field type Vec but that field is only visible to the rdkafka crate .
Adding a function for example pub fn payload
and pub fn headers
on MessageRecord would make the payload and header fields accessible
Metadata
Metadata
Assignees
Labels
No labels