Skip to content

Commit 56e7498

Browse files
committed
Edit pass
1 parent a37330c commit 56e7498

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

articles/service-bus-messaging/service-bus-migrate-azure-credentials.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ The following code example demonstrates how to connect to Azure Service Bus usin
2929
## [.NET](#tab/dotnet)
3030

3131
```csharp
32-
await using var client = new ServiceBusClient("<NAMESPACE-CONNECTION-STRING>");
32+
await using var client = new ServiceBusClient("<CONNECTION-STRING>");
3333
```
3434

3535
## [Java](#tab/java)
3636

3737
```java
3838
ServiceBusSenderClient client = new ServiceBusClientBuilder()
39-
.connectionString("<NAMESPACE-CONNECTION-STRING>")
39+
.connectionString("<CONNECTION-STRING>")
4040
.sender()
4141
.queueName("<QUEUE-NAME>")
4242
.buildClient();
@@ -46,21 +46,21 @@ ServiceBusSenderClient client = new ServiceBusClientBuilder()
4646

4747
```java
4848
ConnectionFactory factory = new ServiceBusJmsConnectionFactory(
49-
"<NAMESPACE-CONNECTION-STRING>",
49+
"<CONNECTION-STRING>",
5050
new ServiceBusJmsConnectionFactorySettings());
5151
```
5252

5353
## [Node.js](#tab/nodejs)
5454

5555
```nodejs
56-
const client = new ServiceBusClient("<NAMESPACE-CONNECTION-STRING>");
56+
const client = new ServiceBusClient("<CONNECTION-STRING>");
5757
```
5858

5959
## [Python](#tab/python)
6060

6161
```python
6262
client = ServiceBusClient(
63-
fully_qualified_namespace = "<NAMESPACE-CONNECTION-STRING>"
63+
fully_qualified_namespace = "<CONNECTION-STRING>"
6464
)
6565
```
6666

@@ -129,9 +129,9 @@ Next, update your code to use passwordless connections.
129129
DefaultAzureCredential credential = new DefaultAzureCredentialBuilder()
130130
.build();
131131

132-
// TODO: Update the <NAMESPACE-CONNECTION-STRING> placeholder.
132+
// TODO: Update the <SERVICE-BUS-NAMESPACE-NAME> placeholder.
133133
ServiceBusSenderClient client = new ServiceBusClientBuilder()
134-
.credential("<NAMESPACE-CONNECTION-STRING>", credential)
134+
.credential("<SERVICE-BUS-NAMESPACE-NAME>.servicebus.windows.net", credential)
135135
.sender()
136136
.queueName("<QUEUE-NAME>")
137137
.buildClient();
@@ -162,10 +162,10 @@ Next, update your code to use passwordless connections.
162162
DefaultAzureCredential credential = new DefaultAzureCredentialBuilder()
163163
.build();
164164

165-
//TODO: Replace the "<NAMESPACE-CONNECTION-STRING>" placeholder.
165+
//TODO: Replace the "<SERVICE-BUS-NAMESPACE-NAME>" placeholder.
166166
ConnectionFactory factory = new ServiceBusJmsConnectionFactory(
167167
credential,
168-
"<NAMESPACE-CONNECTION-STRING>",
168+
"<SERVICE-BUS-NAMESPACE-NAME>.servicebus.windows.net",
169169
new ServiceBusJmsConnectionFactorySettings());
170170
```
171171

@@ -188,9 +188,9 @@ Next, update your code to use passwordless connections.
188188
```nodejs
189189
const credential = new DefaultAzureCredential();
190190
191-
// TODO: Update the <NAMESPACE-CONNECTION-STRING> placeholder.
191+
// TODO: Update the <SERVICE-BUS-NAMESPACE-NAME> placeholder.
192192
const client = new ServiceBusClient(
193-
"<NAMESPACE-CONNECTION-STRING>",
193+
"<SERVICE-BUS-NAMESPACE-NAME>.servicebus.windows.net",
194194
credential
195195
);
196196
```
@@ -214,9 +214,9 @@ Next, update your code to use passwordless connections.
214214
```python
215215
credential = DefaultAzureCredential()
216216
217-
# TODO: Update the <NAMESPACE-CONNECTION-STRING> placeholder.
217+
# TODO: Update the <SERVICE-BUS-NAMESPACE-NAME> placeholder.
218218
client = ServiceBusClient(
219-
fully_qualified_namespace = "<NAMESPACE-CONNECTION-STRING>",
219+
fully_qualified_namespace = "<SERVICE-BUS-NAMESPACE-NAME>.servicebus.windows.net",
220220
credential = credential
221221
)
222222
```

0 commit comments

Comments
 (0)