Skip to content

Commit d4784ac

Browse files
committed
acrolynx
1 parent fbe9e17 commit d4784ac

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

articles/service-bus-messaging/service-bus-java-how-to-use-jms-api-amqp.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The Advanced Message Queuing Protocol (AMQP) 1.0 is an efficient, reliable, wire
2525
Support for AMQP 1.0 in Azure Service Bus means that you can use the queuing and publish/subscribe brokered messaging features from a range of platforms using an efficient binary protocol. Furthermore, you can build applications comprised of components built using a mix of languages, frameworks, and operating systems.
2626

2727
## Get started with Service Bus
28-
This guide assumes that you already have a Service Bus namespace containing a queue named **basicqueue**. If you do not, then you can [create the namespace and queue](service-bus-create-namespace-portal.md) using the [Azure portal](https://portal.azure.com). For more information about how to create Service Bus namespaces and queues, see [Get started with Service Bus queues](service-bus-dotnet-get-started-with-queues.md).
28+
This guide assumes that you already have a Service Bus namespace containing a queue named `basicqueue`. If you don't, then you can [create the namespace and queue](service-bus-create-namespace-portal.md) using the [Azure portal](https://portal.azure.com). For more information about how to create Service Bus namespaces and queues, see [Get started with Service Bus queues](service-bus-dotnet-get-started-with-queues.md).
2929

3030
> [!NOTE]
3131
> Partitioned queues and topics also support AMQP. For more information, see [Partitioned messaging entities](service-bus-partitioning.md) and [AMQP 1.0 support for Service Bus partitioned queues and topics](service-bus-partitioned-queues-and-topics-amqp-overview.md).
@@ -45,7 +45,7 @@ You must add the following four JAR files from the Apache Qpid JMS AMQP 1.0 dist
4545
4646
## Coding Java applications
4747
### Java Naming and Directory Interface (JNDI)
48-
JMS uses the Java Naming and Directory Interface (JNDI) to create a separation between logical names and physical names. Two types of JMS objects are resolved using JNDI: ConnectionFactory and Destination. JNDI uses a provider model into which you can plug different directory services to handle name resolution duties. The Apache Qpid JMS AMQP 1.0 library comes with a simple properties file-based JNDI Provider that is configured using a properties file of the following format:
48+
JMS uses the Java Naming and Directory Interface (JNDI) to create a separation between logical names and physical names. Two types of JMS objects are resolved using JNDI: ConnectionFactory and Destination. JNDI uses a provider model into which you can plug different directory services to handle name resolution duties. The Apache Qpid JMS AMQP 1.0 library comes with a simple property file-based JNDI Provider that is configured using a properties file of the following format:
4949

5050
```TEXT
5151
# servicebus.properties - sample JNDI configuration
@@ -62,7 +62,7 @@ queue.QUEUE = queue1
6262

6363
#### Setup JNDI context and Configure the ConnectionFactory
6464

65-
The **ConnectionString** referenced in the one available in the 'Shared Access Policies' in the [Azure Portal](https://portal.azure.com) under **Primary Connection String**
65+
The **ConnectionString** referenced in the one available in the 'Shared Access Policies' in the [Azure portal](https://portal.azure.com) under **Primary Connection String**
6666
```java
6767
// The connection string builder is the only part of the azure-servicebus SDK library
6868
// we use in this JMS sample and for the purpose of robustly parsing the Service Bus
@@ -132,7 +132,7 @@ Context context = new InitialContext(hashtable);
132132
### A simple JMS application using a Service Bus queue
133133
The following example program sends JMS TextMessages to a Service Bus queue with the JNDI logical name of QUEUE, and receives the messages back.
134134

135-
You can all access all the source code and configuration information from the [Azure Service Bus Samples JMS Queue Quick Start](https://github.com/Azure/azure-service-bus/tree/master/samples/Java/qpid-jms-client/JmsQueueQuickstart)
135+
You can all access all the source code and configuration information from the [Azure Service Bus Samples JMS Queue quickstart](https://github.com/Azure/azure-service-bus/tree/master/samples/Java/qpid-jms-client/JmsQueueQuickstart)
136136

137137
```java
138138
// Copyright (c) Microsoft. All rights reserved.
@@ -338,23 +338,23 @@ MODIFIED_FAILED_UNDELIVERABLE = 5; -> Defer()
338338
```
339339

340340
## JMS Topics vs. Service Bus Topics
341-
Using Azure Service Bus topics and subscriptions through the Java Message Service (JMS) API provides basic send and receive capabilities. It's a convenient choice when porting applications from other message brokers with JMS compliant APIs, even though Service Bus topics differ from JMS Topics and require a few adjustments.
341+
Using Azure Service Bus topics and subscriptions through the Java Message Service (JMS) API provides basic send and receive capabilities. It's a convenient choice when porting applications from other message brokers with JMS-compliant APIs, even though Service Bus topics differ from JMS Topics and require a few adjustments.
342342

343-
Azure Service Bus topics route messages into named, shared, durable subscriptions that are managed through the Azure Resource Management interface, the Azure command line tools, or through the Azure portal. Each subscription allows for up to 2000 selection rules, each of which may have a filter condition and, for SQL filters, also a metadata transformation action. Each filter condition match selects the input message to be copied into the subscription.
343+
Azure Service Bus topics route messages into named, shared, durable subscriptions that are managed through the Azure Resource Management interface, the Azure command-line tools, or through the Azure portal. Each subscription allows for up to 2000 selection rules, each of which may have a filter condition and, for SQL filters, also a metadata transformation action. Each filter condition match selects the input message to be copied into the subscription.
344344

345-
Receiving messages from subscriptions is identical receiving messages from queues. Each subscription has an associated dead-letter queue as well as the ability to automatically forward messages to another queue or topics.
345+
Receiving messages from subscriptions is identical receiving messages from queues. Each subscription has an associated dead-letter queue and the ability to automatically forward messages to another queue or topics.
346346

347-
JMS Topics allow clients to dynamically create nondurable and durable subscribers that optionally allow filtering messages with message selectors. These unshared entities are not supported by Service Bus. The SQL filter rule syntax for Service Bus is, however, very similar to the message selector syntax supported by JMS.
347+
JMS Topics allow clients to dynamically create nondurable and durable subscribers that optionally allow filtering messages with message selectors. These unshared entities aren't supported by Service Bus. The SQL filter rule syntax for Service Bus is, however, similar to the message selector syntax supported by JMS.
348348

349-
The JMS Topic publisher side is compatible with Service Bus, as shown in this sample, but dynamic subscribers are not. The following topology-related JMS APIs are not supported with Service Bus.
349+
The JMS Topic publisher side is compatible with Service Bus, as shown in this sample, but dynamic subscribers aren't. The following topology-related JMS APIs aren't supported with Service Bus.
350350

351351
## Unsupported features and restrictions
352352
The following restrictions exist when using JMS over AMQP 1.0 with Service Bus, namely:
353353

354354
* Only one **MessageProducer** or **MessageConsumer** is allowed per **Session**. If you need to create multiple **MessageProducers** or **MessageConsumers** in an application, create a dedicated **Session** for each of them.
355-
* Volatile topic subscriptions are not currently supported.
356-
* **MessageSelectors** are not currently supported.
357-
* Distributed transactions are not supported (but transacted sessions are supported ).
355+
* Volatile topic subscriptions aren't currently supported.
356+
* **MessageSelectors** aren't currently supported.
357+
* Distributed transactions aren't supported (but transacted sessions are supported).
358358

359359
Additionally, Azure Service Bus splits the control plane from the data plane and therefore does not support several of
360360
JMS's dynamic topology functions:
@@ -371,7 +371,7 @@ JMS's dynamic topology functions:
371371
| createBrowser | unsupported. Use the Peek() functionality of the Service Bus API |
372372
| createQueue | create a queue via management API/tools/portal |
373373
| createTemporaryQueue | create a queue via management API/tools/portal with *AutoDeleteOnIdle* set to an expiration period |
374-
| receiveNoWait | utilize the receive() method provided by the Service Bus SDK and specify a very low or zero timeout |
374+
| receiveNoWait | use the receive() method provided by the Service Bus SDK and specify a very low or zero timeout |
375375

376376
## Summary
377377
This how-to guide showed how to use Service Bus brokered messaging features (queues and publish/subscribe topics) from Java using the popular JMS API and AMQP 1.0.

0 commit comments

Comments
 (0)