This repository holds the samples for JMS 2.0 implementation for Azure Service Bus - Premium tier
-
Clone the repository - This repository contains a Maven project that can be easily imported into the IDE. Follow this guide for quick steps.
-
Add Configuration - Add Service Bus Connection string to the Constants.java class.
public static final String SERVICE_BUS_CONNECTION_STRING = "<YOUR_SERVICEBUS_CONNECTION_STRING>";
-
Select each individual sample, and run as a Java Application.
![Run Java Application](media/Run_Java_app.jpg)
Below is a quick summary of which samples included and what they are currently testing.
- Queue is created (if it doesn't exist).
- 10 messages are sent.
- 10 messages are received.
- Queue is created (if it doesn't exist).
- 10 messages of 10 MB each are sent.
- 10 messages of 10 MB each are received.
- Queue is created (if it doesn't exist).
- 10 messages are sent - each with a custom property and a JMSCorrelation ID set.
- A consumer is created with a message selector (JMSCorrelationID='5' AND prop1='test' OR prop2='test')
- 1 message (which satisfies the selector conditions) is received.
- The remaining 9 messages can be browsed using the Service Bus Explorer.
- Transacted session is created
- 2 producers are created on 2 different queues.
- Message is sent to the 2nd producer through the first queue.
- The scenario is validated by receiving from both queues to ensure the message lands in the same queue.