0

I'm studying kafka transaction and have a question.

I understood a Kafka transaction to be a bundle of one consume and one produce.

Then, can I consume and produce multiple times in a single Kafka transaction?

For example,

  1. application A produces message B
  2. application C consumes message B and produces message D
  3. application E consumes message D and produces message F

Can the above process be contained in a single transaction?

I'm building an app and wondering if what I'm asking is possible.

Thank you.

harvey24
  • 3
  • 2

1 Answers1

0

No; that is not possible; transactions cannot cross application boundaries.

However, a single application can consume and/or produce multiple records within the same transaction, you are not restricted to only one at a time.

Gary Russell
  • 166,535
  • 14
  • 146
  • 179