This project provides a simple REST producer and a CLI consumer using RabbitMQ and AMQP.
producer-service: REST API that publishes meeting events.consumer-service: CLI listener that prints notifications.shared: shared event model.
- Java 11+
- Maven
- Docker (for RabbitMQ)
docker compose up -dRabbitMQ management UI: http://localhost:15672 (guest/guest)
mvn -pl consumer-service -am spring-boot:runmvn -pl producer-service -am spring-boot:runcurl -X POST http://localhost:8080/meetings \
-H "Content-Type: application/json" \
-d '{"purpose":"Study group","startTime":"2025-01-20T10:00:00Z","endTime":"2025-01-20T11:00:00Z"}'
curl -X PUT http://localhost:8080/meetings/meeting-123 \
-H "Content-Type: application/json" \
-d '{"purpose":"Updated study group","startTime":"2025-01-20T10:30:00Z","endTime":"2025-01-20T11:30:00Z"}'- Start RabbitMQ and both services.
- Open Wireshark and start capture on the
lointerface (loopback) orany. - Use a display filter:
amqp(if Wireshark recognizes AMQP)- or
tcp.port == 5672
- Trigger a request with
curland observe AMQP frames. - Look for these packets:
Basic.Publish(producer sends message)Basic.Deliver(RabbitMQ delivers to consumer)Basic.Ack(consumer acknowledges)
If we run RabbitMQ in Docker, AMQP traffic still goes through localhost:5672, so the loopback interface is usually enough.