Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 1.17 KB

README.md

File metadata and controls

37 lines (27 loc) · 1.17 KB

spring-boot-activemq

Tools needed

You need Docker with the compose plugin.

Usage

Launch the ActiveMQ and the spring boot app with docker

docker compose up --build -d

Then you can try with these endpoints :

sequenceDiagram
    Backend->>+ActiveMQ: Subscribe to 'messageQueue'
    Backend->>+ActiveMQ: Publish 'hi everyone !' to 'messageQueue'
    ActiveMQ->>+ActiveMQ: Put the message and make it available to consumers
    ActiveMQ->>+Backend: Broadcast the availability to consumers 
    Backend->>+ActiveMQ: Consume the message
    Backend->>+Backend: Delete the message to remove availability
    Backend->>+Backend: Print the message in the standard output
Loading

You can display the standard output of the backend with

docker logs spring-app-1 -f

In this application, I've used the default configuration for the JMS Listener. In production, we should tune the timeouts and most of all, the consumption acknowledgment mode (CLIENT or AUTO) of the session.