RabbitMQ Java libraries test on GraalVM.
The test consists in a simple publish-consume scenario that builds on top RabbitMQ Stream Java client.
Pre-requisites:
- Local RabbitMQ broker running with all the defaults and stream plugin enabled
- GraalVM installed
Start the broker:
docker run -it --rm --name rabbitmq -p 5552:5552 -p 5672:5672 \
-e RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS='-rabbitmq_stream advertised_host localhost' \
rabbitmq
Enable the stream plugin:
docker exec rabbitmq rabbitmq-plugins enable rabbitmq_stream
Build the project:
./mvnw clean package
Run the application:
target/rabbitmq-stream-graal-vm-test
This should output in the console:
Connecting...
Connected. Creating stream...
Stream created. Starting consumer...
Consumer started.
Not using sub-entry batching
Producer created. Publishing 10000 messages...
Using sub-entry batching with compression codec NONE
Producer created. Publishing 10000 messages...
Using sub-entry batching with compression codec GZIP
Producer created. Publishing 10000 messages...
Using sub-entry batching with compression codec SNAPPY
Producer created. Publishing 10000 messages...
Using sub-entry batching with compression codec LZ4
Producer created. Publishing 10000 messages...
Using sub-entry batching with compression codec ZSTD
Producer created. Publishing 10000 messages...
60000 messages published and consumed
It is possible to use another version of the stream Java client:
./mvnw clean package -Dstream-client.version=0.10.0
(c) 2020-2023 Broadcom. All Rights Reserved. The term Broadcom refers to Broadcom Inc. and/or its subsidiaries.
Licensed under the Apache 2.0 license.