Skip to content

Commit c22a5fe

Browse files
Merge pull request #234474 from spelluru/sbuspwless
ms.custom and no authority host
2 parents 95a42b5 + b7824ae commit c22a5fe

File tree

2 files changed

+8
-20
lines changed

2 files changed

+8
-20
lines changed

articles/service-bus-messaging/service-bus-java-how-to-use-queues.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: This tutorial shows you how to send messages to and receive message
44
ms.date: 04/12/2023
55
ms.topic: quickstart
66
ms.devlang: java
7-
ms.custom: seo-java-july2019, seo-java-august2019, seo-java-september2019, devx-track-java, mode-api
7+
ms.custom: passwordless-java
88
---
99

1010
# Send messages to and receive messages from Azure Service Bus queues (Java)
@@ -130,15 +130,13 @@ Update the `pom.xml` file to add a dependency to the Azure Service Bus package.
130130
### [Passwordless (Recommended)](#tab/passwordless)
131131

132132
> [!IMPORTANT]
133-
> - Replace `NAMESPACENAME` with the name of your Service Bus namespace.
134-
> - This sample uses `AZURE_PUBLIC_CLOUD` as the authority host. For supported authority hosts, see [`AzureAuthorityHosts`](/dotnet/api/azure.identity.azureauthorityhosts)
133+
> Replace `NAMESPACENAME` with the name of your Service Bus namespace.
135134

136135
```java
137136
static void sendMessage()
138137
{
139138
// create a token using the default Azure credential
140139
DefaultAzureCredential credential = new DefaultAzureCredentialBuilder()
141-
.authorityHost(AzureAuthorityHosts.AZURE_PUBLIC_CLOUD)
142140
.build();
143141

144142
ServiceBusSenderClient senderClient = new ServiceBusClientBuilder()
@@ -192,16 +190,14 @@ Update the `pom.xml` file to add a dependency to the Azure Service Bus package.
192190
### [Passwordless (Recommended)](#tab/passwordless)
193191

194192
> [!IMPORTANT]
195-
> - Replace `NAMESPACENAME` with the name of your Service Bus namespace.
196-
> - This sample uses `AZURE_PUBLIC_CLOUD` as the authority host. For supported authority hosts, see [`AzureAuthorityHosts`](/dotnet/api/azure.identity.azureauthorityhosts)
193+
> Replace `NAMESPACENAME` with the name of your Service Bus namespace.
197194

198195

199196
```java
200197
static void sendMessageBatch()
201198
{
202199
// create a token using the default Azure credential
203200
DefaultAzureCredential credential = new DefaultAzureCredentialBuilder()
204-
.authorityHost(AzureAuthorityHosts.AZURE_PUBLIC_CLOUD)
205201
.build();
206202

207203
ServiceBusSenderClient senderClient = new ServiceBusClientBuilder()
@@ -309,8 +305,6 @@ In this section, you add code to retrieve messages from the queue.
309305
> [!IMPORTANT]
310306
> - Replace `NAMESPACENAME` with the name of your Service Bus namespace.
311307
> - Replace `QueueTest` in `QueueTest::processMessage` in the code with the name of your class.
312-
> - This sample uses `AZURE_PUBLIC_CLOUD` as the authority host. For supported authority hosts, see [`AzureAuthorityHosts`](/dotnet/api/azure.identity.azureauthorityhosts)
313-
314308

315309
```java
316310
// handles received messages
@@ -319,7 +313,6 @@ In this section, you add code to retrieve messages from the queue.
319313
CountDownLatch countdownLatch = new CountDownLatch(1);
320314

321315
DefaultAzureCredential credential = new DefaultAzureCredentialBuilder()
322-
.authorityHost(AzureAuthorityHosts.AZURE_PUBLIC_CLOUD)
323316
.build();
324317

325318
ServiceBusProcessorClient processorClient = new ServiceBusClientBuilder()

articles/service-bus-messaging/service-bus-java-how-to-use-topics-subscriptions.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,23 +124,23 @@ Update the `pom.xml` file to add a dependency to the Azure Service Bus package.
124124
```
125125
126126
> [!IMPORTANT]
127-
> Replace `<NAMESPACE CONNECTION STRING>` with the connection string to your Service Bus namespace. Replace `<TOPIC NAME>` with the name of the topic, and `<SUBSCRIPTION NAME>` with the name of the topic's subscription.
127+
> Replace `<NAMESPACE CONNECTION STRING>` with the connection string to your Service Bus namespace. Replace `<TOPIC NAME>` with the name of the topic, and `<SUBSCRIPTION NAME>` with the name of the
128128
129+
> [!IMPORTANT]
130+
> Replace `<NAMESPACE CONNECTION STRING>` with the connection string to your Service Bus namespace. Replace `<TOPIC NAME>` with the name of the topic, and `<SUBSCRIPTION NAME>` with the name of the topic's subscription.
129131
---
130132
3. Add a method named `sendMessage` in the class to send one message to the topic.
131133

132134
### [Passwordless (Recommended)](#tab/passwordless)
133135

134136
> [!IMPORTANT]
135-
> - Replace `NAMESPACENAME` with the name of your Service Bus namespace.
136-
> - This sample uses `AZURE_PUBLIC_CLOUD` as the authority host. For supported authority hosts, see [`AzureAuthorityHosts`](/dotnet/api/azure.identity.azureauthorityhosts)
137+
> Replace `NAMESPACENAME` with the name of your Service Bus namespace.
137138

138139
```java
139140
static void sendMessage()
140141
{
141142
// create a token using the default Azure credential
142143
DefaultAzureCredential credential = new DefaultAzureCredentialBuilder()
143-
.authorityHost(AzureAuthorityHosts.AZURE_PUBLIC_CLOUD)
144144
.build();
145145

146146
ServiceBusSenderClient senderClient = new ServiceBusClientBuilder()
@@ -193,16 +193,13 @@ Update the `pom.xml` file to add a dependency to the Azure Service Bus package.
193193
### [Passwordless (Recommended)](#tab/passwordless)
194194

195195
> [!IMPORTANT]
196-
> - Replace `NAMESPACENAME` with the name of your Service Bus namespace.
197-
> - This sample uses `AZURE_PUBLIC_CLOUD` as the authority host. For supported authority hosts, see [`AzureAuthorityHosts`](/dotnet/api/azure.identity.azureauthorityhosts)
198-
196+
> Replace `NAMESPACENAME` with the name of your Service Bus namespace.
199197

200198
```java
201199
static void sendMessageBatch()
202200
{
203201
// create a token using the default Azure credential
204202
DefaultAzureCredential credential = new DefaultAzureCredentialBuilder()
205-
.authorityHost(AzureAuthorityHosts.AZURE_PUBLIC_CLOUD)
206203
.build();
207204

208205
ServiceBusSenderClient senderClient = new ServiceBusClientBuilder()
@@ -309,7 +306,6 @@ In this section, you add code to retrieve messages from a subscription to the to
309306
> [!IMPORTANT]
310307
> - Replace `NAMESPACENAME` with the name of your Service Bus namespace.
311308
> - Replace `ServiceBusTopicTest` in `ServiceBusTopicTest::processMessage` in the code with the name of your class.
312-
> - This sample uses `AZURE_PUBLIC_CLOUD` as the authority host. For supported authority hosts, see [`AzureAuthorityHosts`](/dotnet/api/azure.identity.azureauthorityhosts)
313309

314310
```java
315311
// handles received messages
@@ -318,7 +314,6 @@ In this section, you add code to retrieve messages from a subscription to the to
318314
CountDownLatch countdownLatch = new CountDownLatch(1);
319315

320316
DefaultAzureCredential credential = new DefaultAzureCredentialBuilder()
321-
.authorityHost(AzureAuthorityHosts.AZURE_PUBLIC_CLOUD)
322317
.build();
323318

324319
// Create an instance of the processor through the ServiceBusClientBuilder

0 commit comments

Comments
 (0)