Replies: 1 comment
-
it doesn't work because you use Close in first iteration |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, new to go so this may be a silly question.
in my code I use a buffered channel to hold messages obtained from a kafka consumer which I then want to write out using a producer to a different broker.
my question is, should I be creating a new kafka.Writer like this for every message? i tried moving the creation of kafka.Writer outside the range loop thinking I can re-use the same same instance of kafka.Writer but this just results in
failed to write messages: io: read/write on closed pipe errors when i try to WriteMessages
ie:
any help would be appreciated
thanks
Beta Was this translation helpful? Give feedback.
All reactions