You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[sarama] 2019/04/23 16:49:36 Initializing new client
[sarama] 2019/04/23 16:49:36 client/metadata fetching metadata for all topics from broker localhost:9092
[sarama] 2019/04/23 16:49:36 Connected to broker at localhost:9092 (unregistered)
[sarama] 2019/04/23 16:49:36 client/brokers registered new broker #1 at localhost:9092
[sarama] 2019/04/23 16:49:36 Successfully initialized new client
Trying to write on aled.1556030976
[sarama] 2019/04/23 16:49:36 client/metadata fetching metadata for [aled.1556030976] from broker localhost:9092
[sarama] 2019/04/23 16:49:36 client/metadata found some partitions to be leaderless
[sarama] 2019/04/23 16:49:36 client/metadata retrying after 250ms... (3 attempts remaining)
[sarama] 2019/04/23 16:49:36 client/metadata fetching metadata for [aled.1556030976] from broker localhost:9092
[sarama] 2019/04/23 16:49:36 producer/broker/1 starting up
[sarama] 2019/04/23 16:49:36 producer/broker/1 state change to [open] on aled.1556030976/0
[sarama] 2019/04/23 16:49:36 Connected to broker at localhost:9092 (registered as #1)
Write successful on aled.1556030976
[sarama] 2019/04/23 16:49:36 Producer shutting down.
[sarama] 2019/04/23 16:49:36 Closing Client
[sarama] 2019/04/23 16:49:36 producer/broker/1 shut down
[sarama] 2019/04/23 16:49:36 Closed connection to broker localhost:9092
[sarama] 2019/04/23 16:49:36 Closed connection to broker localhost:9092
v1.22.0 Logs
[sarama] 2019/04/23 16:45:28 Initializing new client
[sarama] 2019/04/23 16:45:28 client/metadata fetching metadata for all topics from broker localhost:9092
[sarama] 2019/04/23 16:45:28 Connected to broker at localhost:9092 (unregistered)
[sarama] 2019/04/23 16:45:28 client/brokers registered new broker #1 at localhost:9092
[sarama] 2019/04/23 16:45:28 Successfully initialized new client
Trying to write on aled.1556030728
[sarama] 2019/04/23 16:45:28 client/metadata fetching metadata for [aled.1556030728] from broker localhost:9092
[sarama] 2019/04/23 16:45:28 client/metadata found some partitions to be leaderless
[sarama] 2019/04/23 16:45:28 client/metadata retrying after 250ms... (3 attempts remaining)
[sarama] 2019/04/23 16:45:28 client/metadata fetching metadata for [aled.1556030728] from broker localhost:9092
[sarama] 2019/04/23 16:45:28 client/metadata found some partitions to be leaderless
[sarama] 2019/04/23 16:45:28 client/metadata retrying after 250ms... (2 attempts remaining)
[sarama] 2019/04/23 16:45:29 client/metadata fetching metadata for [aled.1556030728] from broker localhost:9092
[sarama] 2019/04/23 16:45:29 client/metadata found some partitions to be leaderless
[sarama] 2019/04/23 16:45:29 client/metadata retrying after 250ms... (1 attempts remaining)
[sarama] 2019/04/23 16:45:29 client/metadata fetching metadata for [aled.1556030728] from broker localhost:9092
[sarama] 2019/04/23 16:45:29 client/metadata found some partitions to be leaderless
[sarama] 2019/04/23 16:45:29 Producer shutting down.
[sarama] 2019/04/23 16:45:29 Closing Client
[sarama] 2019/04/23 16:45:29 Closed connection to broker localhost:9092
Problem Description
After updating the packages for a project that uses sarama (from 1.20.1 to 1.22.0), I get an error when I try to write on a topic that was not previously created, when I did not get any before (see logs) using a sarama.SyncProducer. I have quickly looked at the 1.22.0 changelogs but could not find anything that would explain my issue.
There seems to be an issue with leaderless partitions that is not resolved fast enough in 1.22.0 (not that I understand exactly how it is resolved), that doesn't occur in 1.21.0 (where it is resolved before it runs out of attempts).
I use time.Now().Unix() as a unique seed after my topic's name for testing purposes, so that is why they are never created before-hand
The text was updated successfully, but these errors were encountered:
Versions
Sarama Version: 1.22.0
Kafka Version: 2.1.0
Go Version: 1.11.4
Configuration
I am using the following environment variables in a docker-compose for Kafka :
And here is the code that I am using :
^ To get the connection and then call the following method v
v1.21.0 Logs
v1.22.0 Logs
Problem Description
After updating the packages for a project that uses sarama (from 1.20.1 to 1.22.0), I get an error when I try to write on a topic that was not previously created, when I did not get any before (see logs) using a sarama.SyncProducer. I have quickly looked at the 1.22.0 changelogs but could not find anything that would explain my issue.
There seems to be an issue with leaderless partitions that is not resolved fast enough in 1.22.0 (not that I understand exactly how it is resolved), that doesn't occur in 1.21.0 (where it is resolved before it runs out of attempts).
I use time.Now().Unix() as a unique seed after my topic's name for testing purposes, so that is why they are never created before-hand
The text was updated successfully, but these errors were encountered: