This example assumes you have previously completed the following examples:
- Create an Azure Resource Group
- Create an Azure Service Bus
- Create an Azure Service Bus Queue
- Send a message
First, create the environment variables used to connect to our message queue using the command line below:
export SERVICE_BUS_QUEUE_CONNECTION_STRING=$(az servicebus namespace authorization-rule keys list \
--resource-group $RESOURCE_GROUP --namespace-name $SERVICE_BUS --name RootManageSharedAccessKey \
--query primaryConnectionString --output tsv)
Then build the client:
mvn clean package
And then send the message:
java -jar target/receive-message.jar
Do NOT forget to remove the resources once you are done running the example.
1m