Skip to content

Latest commit

 

History

History
52 lines (32 loc) · 1.34 KB

README.md

File metadata and controls

52 lines (32 loc) · 1.34 KB

RabbitMQ Streams Blog Posts Code Samples

Code for RabbitMQ Streams Blog Posts.

Pre-requisites

  • JDK 8 or more
  • Local instance of RabbitMQ 3.9+ with stream plugin enabled.

To start RabbitMQ:

docker run -it --rm --name rabbitmq -p 5552:5552 \
    -e RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS='-rabbitmq_stream advertised_host localhost' \
    rabbitmq:3.9

In another terminal tab, enable the stream plugin:

docker exec rabbitmq rabbitmq-plugins enable rabbitmq_stream

First Application

Blog Post

Publishing:

./mvnw -q compile exec:java -Dexec.mainClass='com.rabbitmq.stream.FirstApplication$Publish'

Consuming:

./mvnw -q compile exec:java -Dexec.mainClass='com.rabbitmq.stream.FirstApplication$Consume'

NB: remove the -q option if nothing is output on the console, this will help to diagnose problems.

Message Deduplication

Blog Post

NB: remove the -q option if nothing is output on the console, this will help to diagnose problems.

Offset Tracking

Blog Post

NB: remove the -q option if nothing is output on the console, this will help to diagnose problems.