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
Current implementation of the Kafka producer is wrong when using the transactional producer.
Originally, we had implemented that the messages are committed every X messages (which is configurable using MESSAGES_PER_TRANSACTION).
But, this generates following error:
2025-01-30 15:26:25.183.18688423968675 �[1;31mERROR�[m KafkaProducerClient:168 - Failed to send messages: ProducerRecord(topic=my-topic-1457945756-1132137355-continuous, partition=null, headers=RecordHeaders(headers = [], isReadOnly = true), key=null, value=Hello-world - 9, timestamp=null) due to:
Cannot add partition my-topic-1457945756-1132137355-continuous-1 to transaction while in state READY
That's because we are also wrongly configuring the beginning of the transactions.
Instead of this, we should re-write the producer code to commit every transaction properly (after each message).
To workaround this issue, the only thing that needs to be done is to set MESSAGES_PER_TRANSACTION to 1.
The text was updated successfully, but these errors were encountered:
Current implementation of the Kafka producer is wrong when using the transactional producer.
Originally, we had implemented that the messages are committed every X messages (which is configurable using
MESSAGES_PER_TRANSACTION
).But, this generates following error:
That's because we are also wrongly configuring the beginning of the transactions.
Instead of this, we should re-write the producer code to commit every transaction properly (after each message).
To workaround this issue, the only thing that needs to be done is to set
MESSAGES_PER_TRANSACTION
to 1.The text was updated successfully, but these errors were encountered: