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,
- application A produces message B
- application C consumes message B and produces message D
- 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.
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.