mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2026-01-27 02:22:36 +00:00
Update code on README.md
This commit is contained in:
@@ -37,12 +37,9 @@ int main() {
|
||||
// Create the producer
|
||||
Producer producer(config);
|
||||
|
||||
// Get the topic we'll write into
|
||||
Topic topic = producer.get_topic("my_topic");
|
||||
|
||||
// Produce a message!
|
||||
string message = "hey there!";
|
||||
producer.produce(MessageBuilder(topic).partition(0).payload(message));
|
||||
producer.produce(MessageBuilder("my_topic").partition(0).payload(message));
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user