Skip to content
Spring Integration with Spring Cloud Sleuth/Zipkin
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
work-dispatcher
work-handler
.gitignore
README.adoc
pom.xml

README.adoc

Spring Integration with Java DSL support to send and process "Work Units" with a RabbitMQ broker mediating the transfer

Steps

  • Start RabbitMQ server:

rabbitmq-server
  • Start Zipkin

docker run -d -p 9411:9411 openzipkin/zipkin
  • Verify Zipkin url in work-dispatcher/src/main/resources/application.properties and work-handler/src/main/resources/application.properties

spring.zipkin.base-url=http://192.168.99.100:9411/
  • Start the Work Handler:

cd work-handler
mvn spring-boot:run
  • Start the Work Dispatcher:

cd work-dispatcher
mvn spring-boot:run
  • Create dummy work units by calling a controller endpoint:

http://localhost:8080/generateWork?id=1&definition=test&throw_exception=false
  • A throw exception flag will cause the "Work Unit" processor to throw an error. If that happens a complex flow is kicked off -

    • There is a Dead Letter exchange configured for the Work unit queue, the message from the dead letter exchange is routed to the Dead letter queue, dead letter queue has a ttl of 20 seconds and in-turn has the dead letter exchange configured to be the work units queue thus creating a nice cycle. The cycle of consuming messages is broken by adding in a filter in the processing flow to break processing after a set number of retries - 3 in this case.

You can’t perform that action at this time.