For transactions that have been started by a listener container, we need to set the same transaction id prefix for all app instances. For producing-only transaction, we need to set a different value for each instance instead.
I'm using Spring Cloud Stream Kafka Binder in the app which has both types of transactions, and the property spring.cloud.stream.kafka.binder.transaction.transaction-id-prefix
is used for creating a common transaction manager.
I wonder how to make it all work properly because it seems that you can't have it both ways at the same time.