Skip to content

Commit 674c274

Browse files
committed
Docs: update readme 0.1.1
1 parent 183d6b1 commit 674c274

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,20 @@ import (
2828
func main() {
2929
wg := &sync.WaitGroup{}
3030

31-
brokers := []string{"localhost:9092", "localhost:9093", "localhost:9094"}
32-
origin := qstreamer.NewTopic("origin-topic", 3) // Topic name and partition
31+
brokers := []string{"localhost:9092"}
32+
origin := qstreamer.Topic("origin-topic", 3) // Topic name and partition
3333

3434
// Serializer that converts the message to the message to be produced.
3535
// In this case, the message is not converted, so it is a pass-through serializer.
3636
serializer := qstreamer.NewPassThroughSerializer()
3737

38-
destination1 := qstreamer.NewTopic("destination-topic-1", 5) // Topic name and partition
39-
destination2 := qstreamer.NewTopic("destination-topic-2", 3)
38+
destination1 := qstreamer.Topic("destination-topic-1", 5) // Topic name and partition
4039

4140
streamer := qstreamer.NewTopicStreamer(brokers, origin)
4241

4342
cfg := qstreamer.NewStreamConfig(serializer, destination1)
4443
streamer.AddConfig(cfg)
4544

46-
cfg = qstreamer.NewStreamConfig(serializer, destination2)
47-
streamer.AddConfig(cfg)
4845

4946
streamer.Run() // Non-blocking
5047
defer streamer.Stop()

0 commit comments

Comments
 (0)