Using JMS 2.0 APIs to access Azure Service Bus

Published Feb 11 2021 02:30 PM 3,101 Views
Microsoft

[Created on 12 August, 2020, and updated on 22 January, 2021]

Original post is on Medium.

https://logico-jp.medium.com/using-jms-2-0-apis-to-access-azure-service-bus-9f458ec2bf20

 

Japanese edition is here.
https://logico-jp.io/2020/08/12/using-jms-2-0-apis-to-access-azure-service-bus/

 

As you may know, support for JMS 2.0 APIs on Azure Service Bus Premium Tier is generally available. This feature allows us to interact with Azure Service Bus through JMS over AMQP 1.0.

 

Announcing general availability support for Java Message Service (JMS) 2.0 API on Azure Service Bus Premium

https://azure.microsoft.com/updates/announcing-general-availability-support-for-java-message-service...

 

As of 22 January, 2021, “preview” still exists in the document title, but it will be modified shortly.

 

Use Java Message Service 2.0 API with Azure Service Bus Premium
https://docs.microsoft.com/azure/service-bus-messaging/how-to-use-java-message-service-20

 

Note that the following document title is similar to the previous one, but this document does not cover JMS 2.0 APIs but JMS 1.1 APIs in Standard tier.

 

Use the Java Message Service (JMS) with Azure Service Bus and AMQP 1.0
https://docs.microsoft.com/azure/service-bus-messaging/service-bus-java-how-to-use-jms-api-amqp

 

In fact, we can use JMS 1.1 APIs to connect Azure Service Bus standard tier, but support for JMS 1.1 APIs is limited as you see the warning message in the document.

 

Warning
The below guide caters to limited support for Java Message Service (JMS) 1.1 API and exists for Azure Service Bus standard tier only.
Full support for the Java Message Service (JMS) 2.0 API is available only on the Azure Service Bus Premium tier in preview, which is highly recommended.

 

Which tier of Azure Service Bus supports JMS 2.0 APIs?

Premium tier only supports JMS 2.0 APIs. If using JMS 2.0 APIs to interact with Azure Service Bus Standard or Basic tier, the following exception is thrown with the message of “Full JMS 2.0 parity over AMQP is a feature supported only by a Premium Messaging namespace”.

 

image.png

 

Which JMS features are supported?

You can find supported features in the following URL. Note that distributed transaction is not supported.

 

What JMS features are supported?
https://docs.microsoft.com/azure/service-bus-messaging/how-to-use-java-message-service-20#what-jms-f...

 
 

Dependencies

As of 22 January, 2021, the latest version is 0.0.7. Please check the latest one in maven central repository. You can either use jar file to build your applications, or resolve dependencies through Maven or Gradle.

 

azure-servicebus-jms – ServiceBus ConnectionFactory for JMS users
https://search.maven.org/artifact/com.microsoft.azure/azure-servicebus-jms

 
<dependency>
  <groupId>com.microsoft.azure</groupId>
  <artifactId>azure-servicebus-jms</artifactId>
  <version>0.0.7</version>
</dependency>
 
 

Give it a try!

Following the document pointed earlier, you can do it easily. Let me show you examples using JMSContext.

First of all, connection factory should be instantiated in Azure Service Bus specific manner.

import com.microsoft.azure.servicebus.jms.ServiceBusJmsConnectionFactory;
import com.microsoft.azure.servicebus.jms.ServiceBusJmsConnectionFactorySettings;

...

ServiceBusJmsConnectionFactorySettings connectionFactorySettings = new ServiceBusJmsConnectionFactorySettings();
connectionFactorySettings.setConnectionIdleTimeoutMS(20000);
ConnectionFactory factory = new ServiceBusJmsConnectionFactory("CONNECTION_STRING", connectionFactorySettings);
 

Then, application(s) can be implemented in the usual manner of JMS 2.0 APIs. The following snippet is an example to send a text message to a queue.

 
try (JMSContext jmsContext = factory.createContext() ) {
    // Create the queue and topic
    Queue queue = jmsContext.createQueue("QUEUE_NAME");
    // Create the JMS message producer
    JMSProducer producer = jmsContext.createProducer();
    // Create textmessage
    TextMessage msg = jmsContext.createTextMessage(String.format("message sent at %s", (new Date()).toString()));
    // send the message to the queue
    producer.send(queue, msg);
}
catch (JMSException e) {
    e.printStackTrace();
}
 

The next snippet is an example to receive text messages from a queue.

try (JMSContext jmsContext = factory.createContext() ) {
    // Create the queue and topic
    Queue queue = jmsContext.createQueue("QUEUE_NAME");
    // set Message Listener
    JMSConsumer consumer = jmsContext.createConsumer(queue);
    // Listener implements MessageListener.
    consumer.setMessageListener(new Listener());
    System.out.println("Receiver is ready, waiting for messages...");
    System.out.println("press Ctrl+c to shutdown...");
    while (true) {
        Thread.sleep(1000);
    }
} catch(InterruptedException e) {
    e.printStackTrace();
}
 

Here is a code for message listener used in the sample listed above. It is pretty simple since it is used for checking messages only.

 
public class Listener implements MessageListener {
    public void onMessage(Message m) {
        try {
            TextMessage msg = (TextMessage) m;
            // Show message
            System.out.printf("[Dequeued message at %s] %s\n", (new Date()).toString(), msg.getText());
        } catch (JMSException e) {
            e.printStackTrace();
        }
    }
}

 

Subscription name scheme

In case of using topic, we have generally to subscribe a topic in order to wait for messages and creating subscription in advance is required. If not created yet, a subscription is automatically created when creating a JMSConsumer object and generated subscription is deleted when closing JMSConsumer object. As of January 10, 2021, subscription name is generated with the following scheme.

 

1. JMSContext::createConsumer

In case of createConsumer method, subscription name is created as follows.

 

<GUID>$$ND

 

$ is a delimiter, and “ND” would stand for “non durable”. As createConsumer method doesn’t have any way to specify subscription name, GUID is used as an alternative subscription name. Even if setting clientID to JMSContext object, the specified clientID is not used in the subscription name.

 

image.png

2. JMSContext::createDurableConsumer

In case of createDurableConsumer method, subscription name is created as follows.

 

<subscriptionName>$<clientID>$D

 

$ is a delimiter, and “D” would stand for “durable”. Both subscriptionName and clientID are mandatory and should be set to JMSContext object in the application. As you know, calling createDurableConsumer method without ClientID specified result in IllegalStateRuntimeException.

 

image.png

3. JMSContext::createSharedConsumer

In case of createSharedConsumer method, subscription name is created as follows.

 

<subscriptionName>$<clientID>$ND

 

$ is a delimiter, and “ND” would stand for “non durable”. And subscriptionName is mandatory, while clientID is optional.

 

image.png

 

So, two delimiters “$$” can be found in a subscription name when calling createSharedConsumer method without ClientID specified.

 

image.png

4. JMSContext::createSharedDurableConsumer

With clientID specified, subscription name is created as follows (subscriptionName is mandatory).

 

<subscriptionName>$<clientID>$D

 

$ is a delimiter, and “D” would stand for “durable”. This scheme is the same as the scheme of JMSContext::createDurableConsumer.

Without clientID specified, subscription name is created as follows (subscriptionName is mandatory).

 

<subscriptionName>

 

image.png

Here is the table to describe relationship between subscription name specified in codes and subscription name displayed in Azure Portal.

 
Method used
in creating a consumer
<A>
subscription name
specified in codes
<B>
Client ID
Subscription Name
in Azure Portal
createConsumer N/A Optional <GUID>$$ND
createDurableConsumer Mandatory Mandatory <A>$<B>$D
createSharedConsumer Mandatory Mandatory <A>$<B>$ND
createSharedDurableConsumer Mandatory Mandatory <A> or <A>$<B>$D

 

What benefits for you?

When migrating existing Java applications running on application servers to cloud, some customers tend to choose “lift to IaaS” strategy rather than “modernization”. Such customers tend to describe the reasons why they made such decisions.

 

“Our company has no mind to migrate their applications to PaaS since huge migration work are required.”

 

“We decided to keep our applications as it was and not to modernize them, so we chose only lift to IaaS rather than migration to PaaS in order to decrease OPEX.”

 

“We have to continue to use application servers to host our applications since the applications heavily rely on JMS and application server’s features. As of now, just simple migration to IaaS would be the best option for us.”

 

“Distribution transactions are mandatory…”

If a) a managed message broker is required, b) JMS 2.0 APIs are used in existing applications, and c) you have a plan to modernize your applications running on application servers, Azure Service Bus might fit you. Furthermore, if you are familiar with JMS 2.0 APIs, you don’t have to spend lots of time to learn how to develop applications with Azure Service Bus.

 

Conclusion

I confirmed Java application could interact with Azure Service Bus through JMS 2.0 APIs.

My sample codes are available on GitHub.

 

Access Azure Service Bus through JMS 2.0 APIs

https://github.com/anishi1222/Azure-Service-Bus-through-JMS-2.0-APIs

2 Comments
Visitor

Hello, thanks for the explanation.

In my use case, i'd like to create non durable non shared topic subscriptions.
I managed to make this work with @jmslistener with a ServiceBusJmsConnectionFactory but it doesnt work if I use a JmsConnectionFactory.

I'm still able to send messages in the topic with the JmsConnectionFactory but im not able to subscribe.

If I use a JmsConnectionFactory, it fails to create the temporary subscription and it returns an error saying it did not found the messaging entity.

Do you know if it is expected behavior and im forced to use the ServiceBusConnectionFactory or i'm misconfiguring something ?

Thanks

 

Microsoft

My apologizes for late response.
We have to use not JMSConnectionFactory but ServiceBusJmsConnectionFactory when connecting Azure Service Bus via JMS 2.0 API. The reason why we have to do is that Azure Service Bus accepts using the connection string only, as you can see the following document.


Connection factory
https://docs.microsoft.com/en-us/azure/service-bus-messaging/jms-developer-guide?tabs=JMS-20#connect...

 

%3CLINGO-SUB%20id%3D%22lingo-sub-2089536%22%20slang%3D%22en-US%22%3EUsing%20JMS%202.0%20APIs%20to%20access%20Azure%20Service%20Bus%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2089536%22%20slang%3D%22en-US%22%3E%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20ie%20if%20ig%20ih%20ii%20ij%20ik%20il%20im%20in%20io%20ip%20iq%20ir%20is%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%5BCreated%20on%2012%20August%2C%202020%2C%20and%20updated%20on%2022%20January%2C%202021%5D%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20ie%20if%20ig%20ih%20ii%20ij%20ik%20il%20im%20in%20io%20ip%20iq%20ir%20is%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EOriginal%20post%20is%20on%20Medium.%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20ie%20if%20ig%20ih%20ii%20ij%20ik%20il%20im%20in%20io%20ip%20iq%20ir%20is%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%3CA%20href%3D%22https%3A%2F%2Flogico-jp.medium.com%2Fusing-jms-2-0-apis-to-access-azure-service-bus-9f458ec2bf20%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Flogico-jp.medium.com%2Fusing-jms-2-0-apis-to-access-azure-service-bus-9f458ec2bf20%3C%2FA%3E%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20ie%20if%20ig%20ih%20ii%20ij%20ik%20il%20im%20in%20io%20ip%20iq%20ir%20is%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EJapanese%20edition%20is%20here.%3CBR%20%2F%3E%3CA%20class%3D%22bq%20iz%22%20href%3D%22https%3A%2F%2Flogico-jp.io%2F2020%2F08%2F12%2Fusing-jms-2-0-apis-to-access-azure-service-bus%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Flogico-jp.io%2F2020%2F08%2F12%2Fusing-jms-2-0-apis-to-access-azure-service-bus%2F%3C%2FA%3E%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EAs%20you%20may%20know%2C%20support%20for%20JMS%202.0%20APIs%20on%20Azure%20Service%20Bus%20Premium%20Tier%20is%20generally%20available.%20This%20feature%20allows%20us%20to%20interact%20with%20Azure%20Service%20Bus%20through%20JMS%20over%20AMQP%201.0.%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EAnnouncing%20general%20availability%20support%20for%20Java%20Message%20Service%20(JMS)%202.0%20API%20on%20Azure%20Service%20Bus%20Premium%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fupdates%2Fannouncing-general-availability-support-for-java-message-service-jms-20-api-on-azure-service-bus-premium%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fazure.microsoft.com%2Fupdates%2Fannouncing-general-availability-support-for-java-message-service-jms-20-api-on-azure-service-bus-premium%2F%3C%2FA%3E%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EAs%20of%2022%20January%2C%202021%2C%20%E2%80%9Cpreview%E2%80%9D%20still%20exists%20in%20the%20document%20title%2C%20but%20it%20will%20be%20modified%20shortly.%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%3CSPAN%3EUse%20Java%20Message%20Service%202.0%20API%20with%20Azure%20Service%20Bus%20Premium%3C%2FSPAN%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fservice-bus-messaging%2Fhow-to-use-java-message-service-20%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fservice-bus-messaging%2Fhow-to-use-java-message-service-20%3C%2FA%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22ja%20jb%20jc%20jd%20je%20jf%22%3E%0A%3CDIV%20class%3D%22en%20n%20dq%22%3E%0A%3CDIV%20class%3D%22jg%20n%20ac%20p%20jh%20ji%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3ENote%20that%20the%20following%20document%20title%20is%20similar%20to%20the%20previous%20one%2C%20but%20this%20document%20does%20not%20cover%20JMS%202.0%20APIs%20but%20JMS%201.1%20APIs%20in%20Standard%20tier.%3C%2FP%3E%0A%3CDIV%20class%3D%22ja%20jb%20jc%20jd%20je%20jf%22%3E%0A%3CDIV%20class%3D%22en%20n%20dq%22%3E%0A%3CDIV%20class%3D%22jr%20s%22%3E%0A%3CDIV%20class%3D%22js%20s%20jt%20ju%20jv%20jr%20jw%20jx%20jf%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%3CSPAN%3EUse%20the%20Java%20Message%20Service%20(JMS)%20with%20Azure%20Service%20Bus%20and%20AMQP%201.0%3C%2FSPAN%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fservice-bus-messaging%2Fservice-bus-java-how-to-use-jms-api-amqp%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fservice-bus-messaging%2Fservice-bus-java-how-to-use-jms-api-amqp%3C%2FA%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22ja%20jb%20jc%20jd%20je%20jf%22%3E%0A%3CDIV%20class%3D%22en%20n%20dq%22%3E%0A%3CDIV%20class%3D%22jg%20n%20ac%20p%20jh%20ji%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EIn%20fa%3CSPAN%3Ec%3C%2FSPAN%3Et%2C%20we%20can%20use%20JMS%201.1%20APIs%20to%20connect%20Azure%20Service%20Bus%20standard%20tier%2C%20but%20support%20for%20JMS%201.1%20APIs%20is%20limited%20as%20you%20see%20the%20warning%20message%20in%20the%20document.%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CBLOCKQUOTE%20class%3D%22ka%20kb%20kc%22%3E%0A%3CP%20class%3D%22ia%20ib%20kd%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%3CSTRONG%20class%3D%22ic%20cw%22%3EWarning%3C%2FSTRONG%3E%3CBR%20%2F%3EThe%20below%20guide%20caters%20to%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%20class%3D%22ic%20cw%22%3Elimited%20support%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efor%20Java%20Message%20Service%20(JMS)%201.1%20API%20and%20exists%20for%20Azure%20Service%20Bus%20standard%20tier%20only.%3CBR%20%2F%3EFull%20support%20for%20the%20Java%20Message%20Service%20(JMS)%202.0%20API%20is%20available%20only%20on%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22bq%20iz%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fservice-bus-messaging%2Fhow-to-use-java-message-service-20%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSTRONG%20class%3D%22ic%20cw%22%3EAzure%20Service%20Bus%20Premium%20tier%20in%20preview%3C%2FSTRONG%3E%3C%2FA%3E%2C%20which%20is%20highly%20recommended.%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%20class%3D%22ke%20kf%20gh%20av%20kg%20kh%20ki%20ie%20kj%20kk%20kl%20ih%20km%20kn%20ko%20kp%20kq%20kr%20ks%20kt%20ku%20kv%20kw%20kx%20ky%20kz%20el%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22c0bc%22%20class%3D%22ke%20kf%20gh%20av%20kg%20kh%20ki%20ie%20kj%20kk%20kl%20ih%20km%20kn%20ko%20kp%20kq%20kr%20ks%20kt%20ku%20kv%20kw%20kx%20ky%20kz%20el%22%20id%3D%22toc-hId--549930634%22%20id%3D%22toc-hId--549930660%22%20id%3D%22toc-hId--549930660%22%20id%3D%22toc-hId--549930660%22%20id%3D%22toc-hId--549930660%22%3EWhich%20tier%20of%20Azure%20Service%20Bus%20supports%20JMS%202.0%20APIs%3F%3C%2FH2%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EPremium%20tier%20only%20supports%20JMS%202.0%20APIs.%20If%20using%20JMS%202.0%20APIs%20to%20interact%20with%20Azure%20Service%20Bus%20Standard%20or%20Basic%20tier%2C%20the%20following%20exception%20is%20thrown%20with%20the%20message%20of%20%E2%80%9CFull%20JMS%202.0%20parity%20over%20AMQP%20is%20a%20feature%20supported%20only%20by%20a%20Premium%20Messaging%20namespace%E2%80%9D.%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F248874iB6BE3F8E5E583028%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%225c20%22%20class%3D%22ke%20kf%20gh%20av%20kg%20kh%20ki%20ie%20kj%20kk%20kl%20ih%20km%20kn%20ko%20kp%20kq%20kr%20ks%20kt%20ku%20kv%20kw%20kx%20ky%20kz%20el%22%20id%3D%22toc-hId-1937582199%22%20id%3D%22toc-hId-1937582173%22%20id%3D%22toc-hId-1937582173%22%20id%3D%22toc-hId-1937582173%22%20id%3D%22toc-hId-1937582173%22%3EWhich%20JMS%20features%20are%20supported%3F%3C%2FH2%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EYou%20can%20find%20supported%20features%20in%20the%20following%20URL.%20Note%20that%20distributed%20transaction%20is%20not%20supported.%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhat%20JMS%20features%20are%20supported%3F%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fservice-bus-messaging%2Fhow-to-use-java-message-service-20%23what-jms-features-are-supported%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fservice-bus-messaging%2Fhow-to-use-java-message-service-20%23what-jms-features-are-supported%3C%2FA%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22ja%20jb%20jc%20jd%20je%20jf%22%3E%0A%3CDIV%20class%3D%22en%20n%20dq%22%3E%0A%3CDIV%20class%3D%22jg%20n%20ac%20p%20jh%20ji%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%20class%3D%22jr%20s%22%3E%0A%3CDIV%20class%3D%22mb%20s%20jt%20ju%20jv%20jr%20jw%20jx%20jf%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CH2%20id%3D%2233c5%22%20class%3D%22ke%20kf%20gh%20av%20kg%20kh%20ki%20ie%20kj%20kk%20kl%20ih%20km%20kn%20ko%20kp%20kq%20kr%20ks%20kt%20ku%20kv%20kw%20kx%20ky%20kz%20el%22%20id%3D%22toc-hId-130127736%22%20id%3D%22toc-hId-130127710%22%20id%3D%22toc-hId-130127710%22%20id%3D%22toc-hId-130127710%22%20id%3D%22toc-hId-130127710%22%3EDependencies%3C%2FH2%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EAs%20of%2022%20January%2C%202021%2C%20the%20latest%20version%20is%200.0.7.%20Please%20check%20the%20latest%20one%20in%20maven%20central%20repository.%20You%20can%20either%20use%20jar%20file%20to%20build%20your%20applications%2C%20or%20resolve%20dependencies%20through%20Maven%20or%20Gradle.%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eazure-servicebus-jms%20%E2%80%93%20ServiceBus%20ConnectionFactory%20for%20JMS%20users%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fsearch.maven.org%2Fartifact%2Fcom.microsoft.azure%2Fazure-servicebus-jms%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20nofollow%22%3Ehttps%3A%2F%2Fsearch.maven.org%2Fartifact%2Fcom.microsoft.azure%2Fazure-servicebus-jms%3C%2FA%3E%3C%2FP%3E%0A%3CDIV%3E%0A%3CDIV%20class%3D%22syntaxhighlighter%20nogutter%20%20xml%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%20class%3D%22syntaxhighlighter%20nogutter%20%20xml%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-html%22%3E%3CCODE%3E%3CDEPENDENCY%3E%0A%20%20%3CGROUPID%3Ecom.microsoft.azure%3C%2FGROUPID%3E%0A%20%20%3CARTIFACTID%3Eazure-servicebus-jms%3C%2FARTIFACTID%3E%0A%20%20%3CVERSION%3E0.0.7%3C%2FVERSION%3E%0A%3C%2FDEPENDENCY%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CDIV%20class%3D%22ja%20jb%20jc%20jd%20je%20jf%22%3E%0A%3CDIV%20class%3D%22en%20n%20dq%22%3E%0A%3CDIV%20class%3D%22jg%20n%20ac%20p%20jh%20ji%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CFIGURE%20class%3D%22lg%20lh%20li%20lj%20lk%20ll%22%3E%0A%3CDIV%20class%3D%22lu%20s%20ah%22%3E%0A%3CDIV%20class%3D%22vf%20lx%20s%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FFIGURE%3E%0A%3CH2%20id%3D%228935%22%20class%3D%22ke%20kf%20gh%20av%20kg%20kh%20ki%20ie%20kj%20kk%20kl%20ih%20km%20kn%20ko%20kp%20kq%20kr%20ks%20kt%20ku%20kv%20kw%20kx%20ky%20kz%20el%22%20id%3D%22toc-hId--1677326727%22%20id%3D%22toc-hId--1677326753%22%20id%3D%22toc-hId--1677326753%22%20id%3D%22toc-hId--1677326753%22%20id%3D%22toc-hId--1677326753%22%3EGive%20it%20a%20try!%3C%2FH2%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EFollowing%20the%20document%20pointed%20earlier%2C%20you%20can%20do%20it%20easily.%20Let%20me%20show%20you%20examples%20using%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%20class%3D%22kd%22%3EJMSContext%3C%2FEM%3E.%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EFirst%20of%20all%2C%20connection%20factory%20should%20be%20instantiated%20in%20Azure%20Service%20Bus%20specific%20manner.%3C%2FP%3E%0A%3CFIGURE%20class%3D%22lg%20lh%20li%20lj%20lk%20ll%22%3E%0A%3CDIV%20class%3D%22lu%20s%20ah%22%3E%0A%3CDIV%20class%3D%22ve%20lx%20s%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-java%22%3E%3CCODE%3Eimport%20com.microsoft.azure.servicebus.jms.ServiceBusJmsConnectionFactory%3B%0Aimport%20com.microsoft.azure.servicebus.jms.ServiceBusJmsConnectionFactorySettings%3B%0A%0A...%0A%0AServiceBusJmsConnectionFactorySettings%20connectionFactorySettings%20%3D%20new%20ServiceBusJmsConnectionFactorySettings()%3B%0AconnectionFactorySettings.setConnectionIdleTimeoutMS(20000)%3B%0AConnectionFactory%20factory%20%3D%20new%20ServiceBusJmsConnectionFactory(%22CONNECTION_STRING%22%2C%20connectionFactorySettings)%3B%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%0A%3CDIV%20class%3D%22ve%20lx%20s%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FFIGURE%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EThen%2C%20application(s)%20can%20be%20implemented%20in%20the%20usual%20manner%20of%20JMS%202.0%20APIs.%20The%20following%20snippet%20is%20an%20example%20to%20send%20a%20text%20message%20to%20a%20queue.%3C%2FP%3E%0A%3CFIGURE%20class%3D%22lg%20lh%20li%20lj%20lk%20ll%22%3E%0A%3CDIV%20class%3D%22lu%20s%20ah%22%3E%0A%3CDIV%20class%3D%22vg%20lx%20s%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%20class%3D%22vg%20lx%20s%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-java%22%3E%3CCODE%3Etry%20(JMSContext%20jmsContext%20%3D%20factory.createContext()%20)%20%7B%0A%20%20%20%20%2F%2F%20Create%20the%20queue%20and%20topic%0A%20%20%20%20Queue%20queue%20%3D%20jmsContext.createQueue(%22QUEUE_NAME%22)%3B%0A%20%20%20%20%2F%2F%20Create%20the%20JMS%20message%20producer%0A%20%20%20%20JMSProducer%20producer%20%3D%20jmsContext.createProducer()%3B%0A%20%20%20%20%2F%2F%20Create%20textmessage%0A%20%20%20%20TextMessage%20msg%20%3D%20jmsContext.createTextMessage(String.format(%22message%20sent%20at%20%25s%22%2C%20(new%20Date()).toString()))%3B%0A%20%20%20%20%2F%2F%20send%20the%20message%20to%20the%20queue%0A%20%20%20%20producer.send(queue%2C%20msg)%3B%0A%7D%0Acatch%20(JMSException%20e)%20%7B%0A%20%20%20%20e.printStackTrace()%3B%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%0A%3CDIV%20class%3D%22vg%20lx%20s%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FFIGURE%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EThe%20next%20snippet%20is%20an%20example%20to%20receive%20text%20messages%20from%20a%20queue.%3C%2FP%3E%0A%3CFIGURE%20class%3D%22lg%20lh%20li%20lj%20lk%20ll%22%3E%0A%3CDIV%20class%3D%22lu%20s%20ah%22%3E%0A%3CDIV%20class%3D%22vh%20lx%20s%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-java%22%3E%3CCODE%3Etry%20(JMSContext%20jmsContext%20%3D%20factory.createContext()%20)%20%7B%0A%20%20%20%20%2F%2F%20Create%20the%20queue%20and%20topic%0A%20%20%20%20Queue%20queue%20%3D%20jmsContext.createQueue(%E2%80%9DQUEUE_NAME%22)%3B%0A%20%20%20%20%2F%2F%20set%20Message%20Listener%0A%20%20%20%20JMSConsumer%20consumer%20%3D%20jmsContext.createConsumer(queue)%3B%0A%20%20%20%20%2F%2F%20Listener%20implements%20MessageListener.%0A%20%20%20%20consumer.setMessageListener(new%20Listener())%3B%0A%20%20%20%20System.out.println(%22Receiver%20is%20ready%2C%20waiting%20for%20messages...%22)%3B%0A%20%20%20%20System.out.println(%22press%20Ctrl%2Bc%20to%20shutdown...%22)%3B%0A%20%20%20%20while%20(true)%20%7B%0A%20%20%20%20%20%20%20%20Thread.sleep(1000)%3B%0A%20%20%20%20%7D%0A%7D%20catch(InterruptedException%20e)%20%7B%0A%20%20%20%20e.printStackTrace()%3B%0A%7D%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%0A%3CDIV%20class%3D%22vh%20lx%20s%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FFIGURE%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EHere%20is%20a%20code%20for%20message%20listener%20used%20in%20the%20sample%20listed%20above.%20It%20is%20pretty%20simple%20since%20it%20is%20used%20for%20checking%20messages%20only.%3C%2FP%3E%0A%3CFIGURE%20class%3D%22lg%20lh%20li%20lj%20lk%20ll%22%3E%0A%3CDIV%20class%3D%22lu%20s%20ah%22%3E%0A%3CDIV%20class%3D%22vi%20lx%20s%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%20class%3D%22vi%20lx%20s%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-java%22%3E%3CCODE%3Epublic%20class%20Listener%20implements%20MessageListener%20%7B%0A%20%20%20%20public%20void%20onMessage(Message%20m)%20%7B%0A%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20TextMessage%20msg%20%3D%20(TextMessage)%20m%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20Show%20message%0A%20%20%20%20%20%20%20%20%20%20%20%20System.out.printf(%22%5BDequeued%20message%20at%20%25s%5D%20%25s%5Cn%22%2C%20(new%20Date()).toString()%2C%20msg.getText())%3B%0A%20%20%20%20%20%20%20%20%7D%20catch%20(JMSException%20e)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20e.printStackTrace()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FFIGURE%3E%0A%3CP%20class%3D%22ke%20kf%20gh%20av%20kg%20kh%20ki%20ie%20kj%20kk%20kl%20ih%20km%20kn%20ko%20kp%20kq%20kr%20ks%20kt%20ku%20kv%20kw%20kx%20ky%20kz%20el%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%2266f9%22%20class%3D%22ke%20kf%20gh%20av%20kg%20kh%20ki%20ie%20kj%20kk%20kl%20ih%20km%20kn%20ko%20kp%20kq%20kr%20ks%20kt%20ku%20kv%20kw%20kx%20ky%20kz%20el%22%20id%3D%22toc-hId-810186106%22%20id%3D%22toc-hId-810186080%22%20id%3D%22toc-hId-810186080%22%20id%3D%22toc-hId-810186080%22%20id%3D%22toc-hId-810186080%22%3ESubscription%20name%20scheme%3C%2FH2%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EIn%20case%20of%20using%20topic%2C%20we%20have%20generally%20to%20subscribe%20a%20topic%20in%20order%20to%20wait%20for%20messages%20and%20creating%20subscription%20in%20advance%20is%20required.%20If%20not%20created%20yet%2C%20a%20subscription%20is%20automatically%20created%20when%20creating%20a%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%20class%3D%22kd%22%3EJMSConsumer%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eobject%20and%20generated%20subscription%20is%20deleted%20when%20closing%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%20class%3D%22kd%22%3EJMSConsumer%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eobject.%20As%20of%20January%2010%2C%202021%2C%20subscription%20name%20is%20generated%20with%20the%20following%20scheme.%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22f629%22%20class%3D%22md%20kf%20gh%20av%20kg%20me%20mf%20mg%20kj%20mh%20mi%20mj%20km%20mk%20ml%20mm%20kq%20mn%20mo%20mp%20ku%20mq%20mr%20ms%20ky%20mt%20el%22%20id%3D%22toc-hId-1500747580%22%20id%3D%22toc-hId-1500747554%22%20id%3D%22toc-hId-1500747554%22%20id%3D%22toc-hId-1500747554%22%20id%3D%22toc-hId-1500747554%22%3E1.%20JMSContext%3A%3AcreateConsumer%3C%2FH3%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EIn%20case%20of%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%20class%3D%22kd%22%3EcreateConsumer%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Emethod%2C%20subscription%20name%20is%20created%20as%20follows.%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%3E%3CEM%20class%3D%22kd%22%3E%3CGUID%3E%24%24ND%3C%2FGUID%3E%3C%2FEM%3E%3C%2FPRE%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%24%20is%20a%20delimiter%2C%20and%20%E2%80%9CND%E2%80%9D%20would%20stand%20for%20%E2%80%9Cnon%20durable%E2%80%9D.%20As%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%20class%3D%22kd%22%3EcreateConsumer%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Emethod%20doesn%E2%80%99t%20have%20any%20way%20to%20specify%20subscription%20name%2C%20GUID%20is%20used%20as%20an%20alternative%20subscription%20name.%20Even%20if%20setting%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%20class%3D%22kd%22%3EclientID%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eto%20J%3CEM%20class%3D%22kd%22%3EMSContext%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FEM%3Eobject%2C%20the%20specified%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%20class%3D%22kd%22%3EclientID%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eis%20not%20used%20in%20the%20subscription%20name.%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F248875i16F55F5E693AFB43%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH3%20id%3D%225e1e%22%20class%3D%22md%20kf%20gh%20av%20kg%20me%20mf%20mg%20kj%20mh%20mi%20mj%20km%20mk%20ml%20mm%20kq%20mn%20mo%20mp%20ku%20mq%20mr%20ms%20ky%20mt%20el%22%20id%3D%22toc-hId--306706883%22%20id%3D%22toc-hId--306706909%22%20id%3D%22toc-hId--306706909%22%20id%3D%22toc-hId--306706909%22%20id%3D%22toc-hId--306706909%22%3E2.%20JMSContext%3A%3AcreateDurableConsumer%3C%2FH3%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EIn%20case%20of%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%20class%3D%22kd%22%3EcreateDurableConsumer%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Emethod%2C%20subscription%20name%20is%20created%20as%20follows.%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%3E%3CEM%20class%3D%22kd%22%3E%3CSUBSCRIPTIONNAME%3E%24%3CCLIENTID%3E%24D%3C%2FCLIENTID%3E%3C%2FSUBSCRIPTIONNAME%3E%3C%2FEM%3E%3C%2FPRE%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%24%20is%20a%20delimiter%2C%20and%20%E2%80%9CD%E2%80%9D%20would%20stand%20for%20%E2%80%9Cdurable%E2%80%9D.%20Both%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%20class%3D%22kd%22%3EsubscriptionName%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eand%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%20class%3D%22kd%22%3EclientID%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eare%20mandatory%20and%20should%20be%20set%20to%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%20class%3D%22kd%22%3EJMSContext%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eobject%20in%20the%20application.%20As%20you%20know%2C%20calling%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%20class%3D%22kd%22%3EcreateDurableConsumer%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Emethod%20without%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%20class%3D%22kd%22%3EClientID%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Especified%20result%20in%20IllegalStateRuntimeException.%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F248876i51724913D25538FE%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH3%20id%3D%227811%22%20class%3D%22md%20kf%20gh%20av%20kg%20me%20mf%20mg%20kj%20mh%20mi%20mj%20km%20mk%20ml%20mm%20kq%20mn%20mo%20mp%20ku%20mq%20mr%20ms%20ky%20mt%20el%22%20id%3D%22toc-hId--2114161346%22%20id%3D%22toc-hId--2114161372%22%20id%3D%22toc-hId--2114161372%22%20id%3D%22toc-hId--2114161372%22%20id%3D%22toc-hId--2114161372%22%3E3.%20JMSContext%3A%3AcreateSharedConsumer%3C%2FH3%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EIn%20case%20of%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%20class%3D%22kd%22%3EcreateSharedConsumer%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Emethod%2C%20subscription%20name%20is%20created%20as%20follows.%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%3E%3CEM%20class%3D%22kd%22%3E%3CSUBSCRIPTIONNAME%3E%24%3CCLIENTID%3E%24ND%3C%2FCLIENTID%3E%3C%2FSUBSCRIPTIONNAME%3E%3C%2FEM%3E%3C%2FPRE%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%24%20is%20a%20delimiter%2C%20and%20%E2%80%9CND%E2%80%9D%20would%20stand%20for%20%E2%80%9Cnon%20durable%E2%80%9D.%20And%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%20class%3D%22kd%22%3EsubscriptionName%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eis%20mandatory%2C%20while%20c%3CEM%20class%3D%22kd%22%3ElientID%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eis%20optional.%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F248877i5801D6F8AAA2B5D0%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3ESo%2C%20two%20delimiters%20%E2%80%9C%24%24%E2%80%9D%20can%20be%20found%20in%20a%20subscription%20name%20when%20calling%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%20class%3D%22kd%22%3EcreateSharedConsumer%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Emethod%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%20class%3D%22ic%20cw%22%3Ewithout%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%20class%3D%22kd%22%3EClientID%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Especified%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F248878iDA49F4D183465B9B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH3%20id%3D%222ac0%22%20class%3D%22md%20kf%20gh%20av%20kg%20me%20mf%20mg%20kj%20mh%20mi%20mj%20km%20mk%20ml%20mm%20kq%20mn%20mo%20mp%20ku%20mq%20mr%20ms%20ky%20mt%20el%22%20id%3D%22toc-hId-373351487%22%20id%3D%22toc-hId-373351461%22%20id%3D%22toc-hId-373351461%22%20id%3D%22toc-hId-373351461%22%20id%3D%22toc-hId-373351461%22%3E4.%20JMSContext%3A%3AcreateSharedDurableConsumer%3C%2FH3%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%3CSTRONG%20class%3D%22ic%20cw%22%3EWith%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%20class%3D%22kd%22%3EclientID%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Especified%3C%2FSTRONG%3E%2C%20subscription%20name%20is%20created%20as%20follows%20(%3CEM%20class%3D%22kd%22%3EsubscriptionName%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eis%20mandatory).%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%3E%3CEM%20class%3D%22kd%22%3E%3CSUBSCRIPTIONNAME%3E%24%3CCLIENTID%3E%24D%3C%2FCLIENTID%3E%3C%2FSUBSCRIPTIONNAME%3E%3C%2FEM%3E%3C%2FPRE%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%24%20is%20a%20delimiter%2C%20and%20%E2%80%9CD%E2%80%9D%20would%20stand%20for%20%E2%80%9Cdurable%E2%80%9D.%20This%20scheme%20is%20the%20same%20as%20the%20scheme%20of%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%20class%3D%22kd%22%3EJMSContext%3A%3AcreateDurableConsumer%3C%2FEM%3E.%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%3CSTRONG%20class%3D%22ic%20cw%22%3EWithout%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%20class%3D%22kd%22%3EclientID%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Especified%3C%2FSTRONG%3E%2C%20subscription%20name%20is%20created%20as%20follows%20(%3CEM%20class%3D%22kd%22%3EsubscriptionName%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eis%20mandatory).%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%3E%3CEM%20class%3D%22kd%22%3E%3CSUBSCRIPTIONNAME%3E%3C%2FSUBSCRIPTIONNAME%3E%3C%2FEM%3E%3C%2FPRE%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F248879i982383C2CF4AD259%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EHere%20is%20the%20table%20to%20describe%20relationship%20between%20subscription%20name%20specified%20in%20codes%20and%20subscription%20name%20displayed%20in%20Azure%20Portal.%3C%2FP%3E%0A%3CTABLE%20style%3D%22border-style%3A%20solid%3B%20width%3A%20100%25%3B%22%20border%3D%221%22%20width%3D%22100%25%22%3E%3CCAPTION%3E%26nbsp%3B%3C%2FCAPTION%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2220%25%22%20height%3D%22111px%22%3E%3CSTRONG%3EMethod%20used%3CBR%20%2F%3Ein%20creating%20a%20consumer%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2225%25%22%20height%3D%22111px%22%3E%3CSTRONG%3E%3CA%3E%3CBR%20%2F%3Esubscription%20name%3CBR%20%2F%3Especified%20in%20codes%3C%2FA%3E%3C%2FSTRONG%3E%3CA%3E%3C%2FA%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2215%25%22%20height%3D%22111px%22%3E%3CSTRONG%3E%3CB%3E%3CBR%20%2F%3EClient%20ID%3C%2FB%3E%3C%2FSTRONG%3E%3CB%3E%3C%2FB%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2240%25%22%20height%3D%22111px%22%3E%3CSTRONG%3ESubscription%20Name%3CBR%20%2F%3Ein%20Azure%20Portal%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%20height%3D%2230px%22%3E%3CSPAN%3EcreateConsumer%3C%2FSPAN%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2216.666666666666668%25%22%20height%3D%2230px%22%3EN%2FA%3C%2FTD%3E%0A%3CTD%20width%3D%2216.666666666666668%25%22%20height%3D%2230px%22%3EOptional%3C%2FTD%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%20height%3D%2230px%22%3E%3CSPAN%3E%3CGUID%3E%24%24ND%3C%2FGUID%3E%3C%2FSPAN%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%20height%3D%2230px%22%3E%3CSPAN%3EcreateDurableConsumer%3C%2FSPAN%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2216.666666666666668%25%22%20height%3D%2230px%22%3EMandatory%3C%2FTD%3E%0A%3CTD%20width%3D%2216.666666666666668%25%22%20height%3D%2230px%22%3EMandatory%3C%2FTD%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%20height%3D%2230px%22%3E%3CSPAN%3E%3CA%3E%24%3CB%3E%24D%3C%2FB%3E%3C%2FA%3E%3C%2FSPAN%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%20height%3D%2230px%22%3E%3CSPAN%3EcreateSharedConsumer%3C%2FSPAN%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2216.666666666666668%25%22%20height%3D%2230px%22%3EMandatory%3C%2FTD%3E%0A%3CTD%20width%3D%2216.666666666666668%25%22%20height%3D%2230px%22%3EMandatory%3C%2FTD%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%20height%3D%2230px%22%3E%3CSPAN%3E%3CA%3E%24%3CB%3E%24ND%3C%2FB%3E%3C%2FA%3E%3C%2FSPAN%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%20height%3D%2230px%22%3E%3CSPAN%3EcreateSharedDurableConsumer%3C%2FSPAN%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2216.666666666666668%25%22%20height%3D%2230px%22%3EMandatory%3C%2FTD%3E%0A%3CTD%20width%3D%2216.666666666666668%25%22%20height%3D%2230px%22%3EMandatory%3C%2FTD%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%20height%3D%2230px%22%3E%3CSPAN%3E%3CA%3E%20or%26nbsp%3B%3C%2FA%3E%3C%2FSPAN%3E%3CSPAN%3E%3CA%3E%24%3CB%3E%24D%3C%2FB%3E%3C%2FA%3E%3C%2FSPAN%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22519e%22%20class%3D%22ke%20kf%20gh%20av%20kg%20kh%20ki%20ie%20kj%20kk%20kl%20ih%20km%20kn%20ko%20kp%20kq%20kr%20ks%20kt%20ku%20kv%20kw%20kx%20ky%20kz%20el%22%20id%3D%22toc-hId-362848383%22%20id%3D%22toc-hId-362848357%22%20id%3D%22toc-hId-362848357%22%20id%3D%22toc-hId-362848357%22%20id%3D%22toc-hId-362848357%22%3EWhat%20benefits%20for%20you%3F%3C%2FH2%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EWhen%20migrating%20existing%20Java%20applications%20running%20on%20application%20servers%20to%20cloud%2C%20some%20customers%20tend%20to%20choose%20%E2%80%9Clift%20to%20IaaS%E2%80%9D%20strategy%20rather%20than%20%E2%80%9Cmodernization%E2%80%9D.%20Such%20customers%20tend%20to%20describe%20the%20reasons%20why%20they%20made%20such%20decisions.%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CBLOCKQUOTE%20class%3D%22ka%20kb%20kc%22%3E%0A%3CP%20class%3D%22ia%20ib%20kd%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%E2%80%9COur%20company%20has%20no%20mind%20to%20migrate%20their%20applications%20to%20PaaS%20since%20huge%20migration%20work%20are%20required.%E2%80%9D%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20kd%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20kd%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%E2%80%9CWe%20decided%20to%20keep%20our%20applications%20as%20it%20was%20and%20not%20to%20modernize%20them%2C%20so%20we%20chose%20only%20lift%20to%20IaaS%20rather%20than%20migration%20to%20PaaS%20in%20order%20to%20decrease%20OPEX.%E2%80%9D%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20kd%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20kd%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%E2%80%9CWe%20have%20to%20continue%20to%20use%20application%20servers%20to%20host%20our%20applications%20since%20the%20applications%20heavily%20rely%20on%20JMS%20and%20application%20server%E2%80%99s%20features.%20As%20of%20now%2C%20just%20simple%20migration%20to%20IaaS%20would%20be%20the%20best%20option%20for%20us.%E2%80%9D%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20kd%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20kd%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%E2%80%9CDistribution%20transactions%20are%20mandatory%E2%80%A6%E2%80%9D%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EIf%20a)%20a%20managed%20message%20broker%20is%20required%2C%20b)%20JMS%202.0%20APIs%20are%20used%20in%20existing%20applications%2C%20and%20c)%20you%20have%20a%20plan%20to%20modernize%20your%20applications%20running%20on%20application%20servers%2C%20Azure%20Service%20Bus%20might%20fit%20you.%20Furthermore%2C%20if%20you%20are%20familiar%20with%20JMS%202.0%20APIs%2C%20you%20don%E2%80%99t%20have%20to%20spend%20lots%20of%20time%20to%20learn%20how%20to%20develop%20applications%20with%20Azure%20Service%20Bus.%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22c97e%22%20class%3D%22ke%20kf%20gh%20av%20kg%20kh%20ki%20ie%20kj%20kk%20kl%20ih%20km%20kn%20ko%20kp%20kq%20kr%20ks%20kt%20ku%20kv%20kw%20kx%20ky%20kz%20el%22%20id%3D%22toc-hId-229163659%22%20id%3D%22toc-hId-229163633%22%20id%3D%22toc-hId-229163633%22%20id%3D%22toc-hId-229163633%22%20id%3D%22toc-hId-229163633%22%3EConclusion%3C%2FH2%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20la%20ie%20if%20ig%20lb%20ih%20ii%20ij%20lc%20ik%20il%20im%20ld%20in%20io%20ip%20le%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EI%20confirmed%20Java%20application%20could%20interact%20with%20Azure%20Service%20Bus%20through%20JMS%202.0%20APIs.%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EMy%20sample%20codes%20are%20available%20on%20GitHub.%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3EAccess%20Azure%20Service%20Bus%20through%20JMS%202.0%20APIs%3C%2FP%3E%0A%3CP%20class%3D%22ia%20ib%20gh%20ic%20b%20id%20iu%20ie%20if%20ig%20iv%20ih%20ii%20ij%20iw%20ik%20il%20im%20ix%20in%20io%20ip%20iy%20iq%20ir%20it%20dj%20el%22%20data-selectable-paragraph%3D%22%22%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fanishi1222%2FAzure-Service-Bus-through-JMS-2.0-APIs%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fanishi1222%2FAzure-Service-Bus-through-JMS-2.0-APIs%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2089536%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EAs%20you%20may%20know%2C%20support%20for%20JMS%202.0%20APIs%20on%20Azure%20Service%20Bus%20Premium%20Tier%20is%20generally%20available.%20This%20feature%20allows%20us%20to%20interact%20with%20Azure%20Service%20Bus%20through%20JMS%20over%20AMQP%201.0.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2188108%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20JMS%202.0%20APIs%20to%20access%20Azure%20Service%20Bus%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2188108%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%20thanks%20for%20the%20explanation.%3C%2FP%3E%3CP%3EIn%20my%20use%20case%2C%20i'd%20like%20to%20create%20non%20durable%20non%20shared%20topic%20subscriptions.%3CBR%20%2F%3EI%20managed%20to%20make%20this%20work%20with%20%40jmslistener%20with%20a%20ServiceBusJmsConnectionFactory%20but%20it%20doesnt%20work%20if%20I%20use%20a%20JmsConnectionFactory.%3C%2FP%3E%3CP%3EI'm%20still%20able%20to%20send%20messages%20in%20the%20topic%20with%20the%20JmsConnectionFactory%20but%20im%20not%20able%20to%20subscribe.%3C%2FP%3E%3CP%3EIf%20I%20use%20a%20JmsConnectionFactory%2C%20it%20fails%20to%20create%20the%20temporary%20subscription%20and%20it%20returns%20an%20error%20saying%20it%20did%20not%20found%20the%20messaging%20entity.%3C%2FP%3E%3CP%3EDo%20you%20know%20if%20it%20is%20expected%20behavior%20and%20im%20forced%20to%20use%20the%20ServiceBusConnectionFactory%20or%20i'm%20misconfiguring%20something%20%3F%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2260820%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20JMS%202.0%20APIs%20to%20access%20Azure%20Service%20Bus%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2260820%22%20slang%3D%22en-US%22%3E%3CP%3EMy%20apologizes%20for%20late%20response.%3CBR%20%2F%3E%3CSPAN%3EWe%20have%20to%20use%20not%20%3CEM%3EJMSConnectionFactory%3C%2FEM%3E%20but%26nbsp%3B%3CEM%3EServiceBusJmsConnectionFactory%3C%2FEM%3E%20when%20connecting%20Azure%20Service%20Bus%20via%20JMS%202.0%20API.%20The%20reason%20why%20we%20have%20to%20do%20is%20that%20Azure%20Service%20Bus%20accepts%20using%20the%20connection%20string%20only%2C%20as%20you%20can%20see%20the%20following%20document.%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CBR%20%2F%3EConnection%20factory%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-bus-messaging%2Fjms-developer-guide%3Ftabs%3DJMS-20%23connection-factory%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-bus-messaging%2Fjms-developer-guide%3Ftabs%3DJMS-20%23connection-factory%3C%2FA%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Co-Authors
Version history
Last update:
‎May 06 2021 02:05 PM
Updated by: