Publish posted message to RabbitMQ.
docker-compose up -d
./mvnw spring-boot:run
POST to /publish
with id
, message
. (id
, message
are required)
curl -XPOST http://localhost:8080/publish -H'Content-Type: application/json' -d'{"id":"1","message":"Hello"}'
Loop example:
for i in `seq 1 100`; do echo; echo $i | tr '\n' '\t'; curl -XPOST http://localhost:8080/publish -H'Content-Type: application/json' -d'{"id":"'$i'","message":"'`date -Is`'"}' & sleep 1; done
app.is-confirm-enabled
: (boolean) Enable Publisher Confirm. The default value is false
.
spring.rabbitmq.host
, spring.rabbitmq.port
/ spring.rabbitmq.addresses
: Toggle where to connect.