Files
spring-kafka/samples/sample-03
Nacho Munoz e547d0a96d Kafka Streams sample demo for TopologyTestDriver
Fixes: #1853

* Demonstrating Kafka Streams `TopologyTestDriver`
* README updates in the sample
* Update Spring Boot parent version of the samples to 3.2.5
2024-04-29 17:03:19 -04:00
..
2018-11-05 14:11:17 -05:00
2022-12-20 13:34:33 -05:00
2018-11-05 14:11:17 -05:00

== Sample 3

This sample demonstrates the use of transactions, including container-managed transactions on the consumer side.
The listener receives a batch of messages and sends them to another topic, all within one transaction.

Run the application and use curl to send some data:

`$ curl -X POST http://localhost:8080/send/foos/a,b,c,d,e`

Console:

[source, bash]
----
2018-11-05 11:50:29.244  INFO 60437 --- [fooGroup2-0-C-1] com.example.Application                  : Received: [Foo2 [foo=a], Foo2 [foo=b], Foo2 [foo=c], Foo2 [foo=d], Foo2 [foo=e]]

2018-11-05 11:50:29.247 INFO 60437 --- [fooGroup2-0-C-1] com.example.Application                  : Messages sent, hit enter to commit tx

2018-11-05 11:50:33.045  INFO 60437 --- [fooGroup3-0-C-1] com.example.Application                  : Received: [A, B, C, D, E]
----