Skip to content

Commit

Permalink
Update sample docs for console output format
Browse files Browse the repository at this point in the history
  • Loading branch information
esperar authored Sep 18, 2023
1 parent 7914d90 commit 3a11dd7
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 19 deletions.
22 changes: 14 additions & 8 deletions samples/sample-01/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,17 @@ The consumer is configured with a `SeekToCurrentErrorHandler` which replays fail

A second `@KafkaListener` consumes the raw JSON from the message.

`2018-11-05 10:12:32.552 INFO 41635 --- [ fooGroup-0-C-1] com.example.Application : Received: Foo2 [foo=fail]`
`2018-11-05 10:12:32.561 ERROR 41635 --- [ fooGroup-0-C-1] essageListenerContainer$ListenerConsumer : Error handler threw an exception`
`...`
`2018-11-05 10:12:33.033 INFO 41635 --- [ fooGroup-0-C-1] com.example.Application : Received: Foo2 [foo=fail]`
`2018-11-05 10:12:33.033 ERROR 41635 --- [ fooGroup-0-C-1] essageListenerContainer$ListenerConsumer : Error handler threw an exception`
`...`
`2018-11-05 10:12:33.537 INFO 41635 --- [ fooGroup-0-C-1] com.example.Application : Received: Foo2 [foo=fail]`
`2018-11-05 10:12:43.359 INFO 41635 --- [ dltGroup-0-C-1] com.example.Application : Received from DLT: {"foo":"fail"}`
Console:

[source, bash]
----
2018-11-05 10:12:32.552 INFO 41635 --- [ fooGroup-0-C-1] com.example.Application : Received: Foo2 [foo=fail]
2018-11-05 10:12:32.561 ERROR 41635 --- [ fooGroup-0-C-1] essageListenerContainer$ListenerConsumer : Error handler threw an exception
...
2018-11-05 10:12:33.033 INFO 41635 --- [ fooGroup-0-C-1] com.example.Application : Received: Foo2 [foo=fail]
2018-11-05 10:12:33.033 ERROR 41635 --- [ fooGroup-0-C-1] essageListenerContainer$ListenerConsumer : Error handler threw an exception
...
2018-11-05 10:12:33.537 INFO 41635 --- [ fooGroup-0-C-1] com.example.Application : Received: Foo2 [foo=fail]
2018-11-05 10:12:43.359 INFO 41635 --- [ dltGroup-0-C-1] com.example.Application : Received from DLT: {"foo":"fail"}
----
11 changes: 8 additions & 3 deletions samples/sample-03/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ Run the application and use curl to send some data:

Console:

`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`
[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]
----

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

19 changes: 11 additions & 8 deletions samples/sample-04/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,24 @@ Run the application and use curl to send some data:

`$ curl -X POST http://localhost:8080/send/fail; curl -X POST http://localhost:8080/send/good`


Console:

`2021-05-11 16:17:55.372 INFO 75520 --- [ fooGroup-0-C-1] com.example.Application : Received: fail from topic4 @ xx`
[source, bash]
----
2021-05-11 16:17:55.372 INFO 75520 --- [ fooGroup-0-C-1] com.example.Application : Received: fail from topic4 @ xx
`2021-05-11 16:17:55.399 INFO 75520 --- [ fooGroup-0-C-1] com.example.Application : Received: good from topic4 @ xx`
2021-05-11 16:17:55.399 INFO 75520 --- [ fooGroup-0-C-1] com.example.Application : Received: good from topic4 @ xx
`2021-05-11 16:17:57.384 INFO 75520 --- [etry-2000-0-C-1] com.example.Application : Received: fail from topic4-retry-2000 @ xx`
2021-05-11 16:17:57.384 INFO 75520 --- [etry-2000-0-C-1] com.example.Application : Received: fail from topic4-retry-2000 @ xx
`2021-05-11 16:18:01.390 INFO 75520 --- [etry-4000-0-C-1] com.example.Application : Received: fail from topic4-retry-4000 @ xx`
2021-05-11 16:18:01.390 INFO 75520 --- [etry-4000-0-C-1] com.example.Application : Received: fail from topic4-retry-4000 @ xx
`2021-05-11 16:18:09.399 INFO 75520 --- [etry-8000-0-C-1] com.example.Application : Received: fail from topic4-retry-8000 @ xx`
2021-05-11 16:18:09.399 INFO 75520 --- [etry-8000-0-C-1] com.example.Application : Received: fail from topic4-retry-8000 @ xx
`2021-05-11 16:18:19.407 INFO 75520 --- [try-10000-0-C-1] com.example.Application : Received: fail from topic4-retry-10000 @ xx`
2021-05-11 16:18:19.407 INFO 75520 --- [try-10000-0-C-1] com.example.Application : Received: fail from topic4-retry-10000 @ xx
`2021-05-11 16:18:19.918 INFO 75520 --- [Group-dlt-0-C-1] com.example.Application : DLT Received: fail from topic4-dlt @ xx`
2021-05-11 16:18:19.918 INFO 75520 --- [Group-dlt-0-C-1] com.example.Application : DLT Received: fail from topic4-dlt @ xx
----

As you can see the "good" record is processed while the failed record is retried by the series of retry topics.

0 comments on commit 3a11dd7

Please sign in to comment.