Skip to content

bijukunjummen/si-dsl-rabbit-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 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.

About

Spring Integration Java DSL with RabbitMQ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages