Skip to content

Latest commit

 

History

History
18 lines (11 loc) · 675 Bytes

README.md

File metadata and controls

18 lines (11 loc) · 675 Bytes

Testing Kafka transactional

Start Kafka

bin/zookeeper-server-start.sh config/zookeeper.properties

bin/kafka-server-start.sh config/server.properties

Create topic (only after first kafka start)

bin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic kafka-tx-topic

Start services and check results

  1. Start KafkaTxProducerApplication to produce messages.
  2. Check console output.
  3. Start KafkaTxConsumerApplication to consume messages.
  4. Check console output: only messages sent over commited transactions should be consumed (due to isolation.level: read_committed consumer configuration)