File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -28,23 +28,20 @@ import (
28
28
func main () {
29
29
wg := &sync.WaitGroup {}
30
30
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
33
33
34
34
// Serializer that converts the message to the message to be produced.
35
35
// In this case, the message is not converted, so it is a pass-through serializer.
36
36
serializer := qstreamer.NewPassThroughSerializer ()
37
37
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
40
39
41
40
streamer := qstreamer.NewTopicStreamer (brokers, origin)
42
41
43
42
cfg := qstreamer.NewStreamConfig (serializer, destination1)
44
43
streamer.AddConfig (cfg)
45
44
46
- cfg = qstreamer.NewStreamConfig (serializer, destination2)
47
- streamer.AddConfig (cfg)
48
45
49
46
streamer.Run () // Non-blocking
50
47
defer streamer.Stop ()
You can’t perform that action at this time.
0 commit comments