1. Spring Boot
  2. Tutorial

Produce Messages

Run the following command to run the Spring Boot application for the Producer.

gradle bootRun --args='--producer'

You should see output resembling this:

2024-11-16T21:09:11.161-08:00  INFO 23421 --- [ad | producer-1] examples.Producer                        : Produced event to topic purchases: key = awalther   value = t-shirts
2024-11-16T21:09:11.162-08:00  INFO 23421 --- [ad | producer-1] examples.Producer                        : Produced event to topic purchases: key = htanaka    value = t-shirts
2024-11-16T21:09:11.162-08:00  INFO 23421 --- [ad | producer-1] examples.Producer                        : Produced event to topic purchases: key = htanaka    value = batteries
2024-11-16T21:09:11.162-08:00  INFO 23421 --- [ad | producer-1] examples.Producer                        : Produced event to topic purchases: key = eabara     value = t-shirts
2024-11-16T21:09:11.162-08:00  INFO 23421 --- [ad | producer-1] examples.Producer                        : Produced event to topic purchases: key = htanaka    value = t-shirts
2024-11-16T21:09:11.162-08:00  INFO 23421 --- [ad | producer-1] examples.Producer                        : Produced event to topic purchases: key = awalther   value = t-shirts
2024-11-16T21:09:11.162-08:00  INFO 23421 --- [ad | producer-1] examples.Producer                        : Produced event to topic purchases: key = eabara     value = t-shirts
2024-11-16T21:09:11.224-08:00  INFO 23421 --- [ad | producer-1] examples.Producer                        : Produced event to topic purchases: key = jsmith     value = book
2024-11-16T21:09:11.225-08:00  INFO 23421 --- [ad | producer-1] examples.Producer                        : Produced event to topic purchases: key = jsmith     value = batteries
2024-11-16T21:09:11.225-08:00  INFO 23421 --- [ad | producer-1] examples.Producer                        : Produced event to topic purchases: key = jsmith     value = gift card
Previous
Build Consumer