hi guys,
I created a sample .net application following the example below, which sends Strings to a topic
Apache Kafka and .NET - Getting Started Tutorial (confluent.io)
However, I am now trying to send CloudEvents but I am unable to find an example to refer to. Appreciate some help
CloudEvent cloudEvent = new CloudEvent
{
Id = "event-id",
Type = "event-type",
Source = new Uri("https://cloudevents.io/"),
Time = DateTimeOffset.UtcNow,
DataContentType = "application/json",
Data = content
};
producer.Produce(topic, new Message<string, CloudEvent> { Key = user, Value = cloudEvent}
The above code is not even compiling.
Thanks