kafkajs icon indicating copy to clipboard operation
kafkajs copied to clipboard

Sending 2 or more transactions in a row throws error

Open mark-b-ab opened this issue 2 years ago • 0 comments

Describe the bug When you send multiple transactions in a row, error messages are logged, but messages are sent correctly

To Reproduce Code to reproduce

Expected behavior Three messages sent without errors

Environment:

  • OS: macOS 12.2.1
  • KafkaJS version 1.16.0
  • Kafka version 3.0
  • NodeJS version v17.7.1

Logs

Sending message 1
Sending message 2
ERROR: Response AddPartitionsToTxn(key: 24, version: 1)
ERROR: Failed to send messages: The producer attempted to update a transaction while another concurrent operation on the same transaction was ongoing
ERROR: Response AddPartitionsToTxn(key: 24, version: 1)
ERROR: Failed to send messages: The producer attempted to update a transaction while another concurrent operation on the same transaction was ongoing
Sending message 3
ERROR: Response AddPartitionsToTxn(key: 24, version: 1)
ERROR: Failed to send messages: The producer attempted to update a transaction while another concurrent operation on the same transaction was ongoing

mark-b-ab avatar Mar 14 '22 13:03 mark-b-ab