Skip to content

Commit 0aa68e1

Browse files
Merge pull request #271611 from spelluru/sbuspartition0409
Fixed Service Bus & Relay Git issues
2 parents 237c201 + e1b5637 commit 0aa68e1

11 files changed

+80
-106
lines changed

articles/azure-relay/includes/relay-hybrid-connections-dotnet-get-started-client.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
author: spelluru
2+
author: clemensv
33
ms.service: service-bus-relay
44
ms.topic: include
55
ms.date: 08/10/2023
6-
ms.author: spelluru
6+
ms.author: samurp
77
---
88
### Create a console application
99

articles/azure-relay/includes/relay-hybrid-connections-dotnet-get-started-server.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
---
2-
title: include file
3-
description: include file
4-
services: service-bus-relay
5-
author: spelluru
2+
author: clemensv
63
ms.service: service-bus-relay
74
ms.topic: include
8-
ms.date: 08/10/2023
9-
ms.author: spelluru
10-
ms.custom: include file
11-
5+
ms.date: 01/04/2024
6+
ms.author: samurp
127
---
138

149
### Create a console application

articles/azure-relay/includes/relay-hybrid-connections-http-requests-dotnet-get-started-client.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
---
2-
title: include file
3-
description: include file
4-
services: service-bus-relay
52
author: clemensv
63
ms.service: service-bus-relay
74
ms.topic: include
8-
ms.date: 08/10/2023
9-
ms.author: clemensv
10-
ms.custom: include file
11-
5+
ms.date: 01/04/2024
6+
ms.author: samurp
127
---
138

149

1510
### Create a console application
1611

17-
If you have disabled the "Requires Client Authorization" option when creating the Relay,
12+
If you disabled the "Requires Client Authorization" option when creating the Relay,
1813
you can send requests to the Hybrid Connections URL with any browser. For accessing
1914
protected endpoints, you need to create and pass a token in the `ServiceBusAuthorization`
2015
header, which is shown here.
@@ -43,9 +38,16 @@ In Visual Studio, create a new **Console App (.NET Framework)** project.
4338
2. Add constants to the `Program` class for the hybrid connection details. Replace the placeholders in brackets with the values that you obtained when you created the hybrid connection. Be sure to use the fully qualified namespace name.
4439

4540
```csharp
41+
// replace {RelayNamespace} with the name of your namespace
4642
private const string RelayNamespace = "{RelayNamespace}.servicebus.windows.net";
43+
44+
// replace {HybridConnectionName} with the name of your hybrid connection
4745
private const string ConnectionName = "{HybridConnectionName}";
46+
47+
// replace {SAKKeyName} with the name of your Shared Access Policies key, which is RootManageSharedAccessKey by default
4848
private const string KeyName = "{SASKeyName}";
49+
50+
// replace {SASKey} with the primary key of the namespace you saved earlier
4951
private const string Key = "{SASKey}";
5052
```
5153
3. Add the following method to the `Program` class:

articles/azure-relay/includes/relay-hybrid-connections-http-requests-dotnet-get-started-server.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
---
2-
title: include file
3-
description: include file
4-
services: service-bus-relay
52
author: clemensv
63
ms.service: service-bus-relay
74
ms.topic: include
8-
ms.date: 08/10/2023
9-
ms.author: clemensv
10-
ms.custom: include file
11-
5+
ms.date: 01/04/2024
6+
ms.author: samurp
127
---
138

149
### Create a console application

articles/azure-relay/includes/relay-hybrid-connections-http-requests-java-get-started-client.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,24 @@
11
---
2-
title: include file
3-
description: include file
4-
services: service-bus-relay
52
author: clemensv
63
ms.service: service-bus-relay
74
ms.topic: include
8-
ms.date: 11/21/2023
5+
ms.date: 01/04/2024
96
ms.author: samurp
10-
ms.custom: include file
11-
127
---
138

149
### Create a Java application
1510

16-
If you have disabled the "Requires Client Authorization" option when creating the Relay,
11+
If you disabled the "Requires Client Authorization" option when creating the Relay,
1712
you can send requests to the Hybrid Connections URL with any browser. For accessing
1813
protected endpoints, you need to create and pass a token in the `ServiceBusAuthorization`
1914
header, which is shown here.
2015

2116
Here's a simple Maven project structure and a Java class that demonstrates sending requests to
2217
a Hybrid Connections URL with client authorization utilizing the Azure Relay library.
2318

24-
### Add the Relay MVN package
19+
### Add the Relay package
2520

26-
Modify your pom.xml file in your maven application package to include the following:
21+
Modify your pom.xml file in your maven application package to include the Azure Relay package.
2722

2823
```xml
2924
<dependency>
@@ -34,8 +29,8 @@ Modify your pom.xml file in your maven application package to include the follow
3429
```
3530

3631
Run `mvn dependency:copy-dependencies -DoutputDirectory=lib` in your mvn project to add the
37-
dependency jar file in the lib directory of your project. This will also import all dependencies
38-
of the `azure-relay` mvn package. This package provides functions to construct Relay URIs and tokens.
32+
dependency jar file in the lib directory of your project. It also imports all dependencies
33+
of the `azure-relay` mvn package. This package provides functions to construct Relay uniform resource identifiers (URIs) and tokens.
3934

4035
### Write some code to send messages
4136

@@ -79,12 +74,12 @@ of the `azure-relay` mvn package. This package provides functions to construct R
7974
}
8075
```
8176
Replace the placeholders in brackets with the values you obtained when you created the hybrid connection.
82-
1. `namespace` - The Relay namespace. Be sure to use the fully qualified namespace name; for example, `{namespace}.servicebus.windows.net`.
83-
2. `path` - The name of the hybrid connection.
84-
3. `keyrule` - The name of the SAS key.
85-
4. `key` - The SAS key value.
77+
- `namespace` - The Relay namespace. Be sure to use the fully qualified namespace name; for example, `{namespace}.servicebus.windows.net`.
78+
- `path` - The name of the hybrid connection.
79+
- `keyrule` - Name of your Shared Access Policies key, which is `RootManageSharedAccessKey` by default.
80+
- `nst key` - The primary key of the namespace you saved earlier.
8681

87-
5. Add the following code to the `Sender.java` file, below is the expected main function for your java class:
82+
5. Add the following code to the `Sender.java` file. The main function should look like the following code.
8883

8984
```java
9085
public static void main(String[] args) throws IOException {
@@ -155,7 +150,7 @@ of the `azure-relay` mvn package. This package provides functions to construct R
155150
}
156151
```
157152
158-
Here is what your `Sender.java` file should look like:
153+
Here's what your `Sender.java` file should look like:
159154
160155
```java
161156
package com.example.sender;

articles/azure-relay/includes/relay-hybrid-connections-http-requests-java-get-started-server.md

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,24 @@
11
---
2-
title: include file
3-
description: include file
4-
services: service-bus-relay
52
author: clemensv
63
ms.service: service-bus-relay
74
ms.topic: include
8-
ms.date: 11/21/2023
5+
ms.date: 01/04/2024
96
ms.author: samurp
10-
ms.custom: include file
11-
127
---
138

149
### Create a Java application
1510

16-
If you have disabled the "Requires Client Authorization" option when creating the Relay,
11+
If you disabled the "Requires Client Authorization" option when creating the Relay,
1712
you can send requests to the Hybrid Connections URL with any browser. For accessing
1813
protected endpoints, you need to create and pass a token in the `ServiceBusAuthorization`
1914
header, which is shown here.
2015

2116
Here's a simple Maven project structure and a Java class that demonstrates sending requests to
2217
a Hybrid Connections URL with client authorization utilizing the Azure Relay library.
2318

24-
### Add the Relay MVN package
19+
### Add the Relay package
2520

26-
Modify your pom.xml file in your maven application package to include the following:
21+
Modify your pom.xml file in your maven application package to include the Azure Relay package.
2722

2823
```xml
2924
<dependency>
@@ -33,7 +28,7 @@ Modify your pom.xml file in your maven application package to include the follow
3328
</dependency>
3429
```
3530

36-
Run `mvn dependency:copy-dependencies -DoutputDirectory=lib` in your mvn project to add the dependency jar file in the lib directory of your project. This will also import all dependencies of the `azure-relay` mvn package. This package provides functions to construct Relay URIs and tokens.
31+
Run `mvn dependency:copy-dependencies -DoutputDirectory=lib` in your mvn project to add the dependency jar file in the lib directory of your project. It imports all dependencies of the `azure-relay` mvn package. This package provides functions to construct Relay uniform resource identifiers (URIs) and tokens.
3732

3833
### Write some code to send messages
3934

@@ -77,12 +72,12 @@ Run `mvn dependency:copy-dependencies -DoutputDirectory=lib` in your mvn project
7772

7873
Replace the placeholders in brackets with the values you obtained when you created the hybrid connection.
7974

80-
1. `namespace` - The Relay namespace. Be sure to use the fully qualified namespace name; for example, `{namespace}.servicebus.windows.net`.
81-
2. `path` - The name of the hybrid connection.
82-
3. `keyrule` - The name of the SAS key.
83-
4. `key` - The SAS key value.
75+
- `namespace` - The Relay namespace. Be sure to use the fully qualified namespace name; for example, `{namespace}.servicebus.windows.net`.
76+
- `path` - The name of the hybrid connection.
77+
- `keyrule` - Name of your Shared Access Policies key, which is `RootManageSharedAccessKey` by default.
78+
- `nst key` - The primary key of the namespace you saved earlier.
8479

85-
4. Add the following code to the `Listener.java` file, below is the expected main function for your java class:
80+
4. Add the following code to the `Listener.java` file. The main function should look like the following code:
8681

8782
```java
8883
public static void main( String[] args ) throws URISyntaxException
@@ -136,7 +131,7 @@ Run `mvn dependency:copy-dependencies -DoutputDirectory=lib` in your mvn project
136131
}
137132
138133
```
139-
Here is what your `Listener.java` file should look like:
134+
Here's what your `Listener.java` file should look like:
140135
141136
```java
142137
package com.example.listener;

articles/azure-relay/includes/relay-hybrid-connections-http-requests-node-get-started-client.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
---
2-
title: include file
3-
description: include file
4-
services: service-bus-relay
52
author: clemensv
63
ms.service: service-bus-relay
74
ms.topic: include
8-
ms.date: 05/02/2018
9-
ms.author: clemensv
10-
ms.custom: include file
11-
5+
ms.date: 01/04/2024
6+
ms.author: samurp
127
---
138

149
### Create a Node.js application
@@ -20,7 +15,7 @@ header, which is shown here.
2015

2116
To start, create a new JavaScript file called `sender.js`.
2217

23-
### Add the Relay NPM package
18+
### Add the Relay Node Package Manager package
2419

2520
Run `npm install hyco-https` from a Node command prompt in your project folder. This package
2621
also imports the regular `https` package. For the client-side, the key difference is that
@@ -36,13 +31,13 @@ the package provides functions to construct Relay URIs and tokens.
3631

3732
2. Add the following constants to the `sender.js` file for the hybrid connection details. Replace the placeholders in brackets with the values you obtained when you created the hybrid connection.
3833

39-
1. `const ns` - The Relay namespace. Be sure to use the fully qualified namespace name; for example, `{namespace}.servicebus.windows.net`.
40-
2. `const path` - The name of the hybrid connection.
41-
3. `const keyrule` - The name of the SAS key.
42-
4. `const key` - The SAS key value.
34+
- `const ns` - The Relay namespace. Be sure to use the fully qualified namespace name; for example, `{namespace}.servicebus.windows.net`.
35+
- `const path` - The name of the hybrid connection.
36+
- `const keyrule` - Name of your Shared Access Policies key, which is `RootManageSharedAccessKey` by default.
37+
- `const key` - The primary key of the namespace you saved earlier.
4338

44-
3. Add the following code to the `sender.js` file. You will notice that the
45-
code does not differ significantly from the regular use of the Node.js
39+
3. Add the following code to the `sender.js` file. You notice that the
40+
code doesn't differ significantly from the regular use of the Node.js
4641
HTTPS client; it just adds the authorization header.
4742
4843
```js
@@ -73,7 +68,7 @@ the package provides functions to construct Relay URIs and tokens.
7368
console.error(`Got error: ${e.message}`);
7469
});
7570
```
76-
Here is what your sender.js file should look like:
71+
Here's what your sender.js file should look like:
7772

7873
```js
7974
const https = require('hyco-https');

articles/azure-relay/includes/relay-hybrid-connections-http-requests-node-get-started-server.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
---
2-
title: include file
3-
description: include file
4-
services: service-bus-relay
52
author: clemensv
63
ms.service: service-bus-relay
74
ms.topic: include
8-
ms.date: 05/02/2018
9-
ms.author: clemensv
10-
ms.custom: include file
11-
5+
ms.date: 01/04/2024
6+
ms.author: samurp
127
---
138

149
### Create a Node.js application
1510

1611
Create a new JavaScript file called `listener.js`.
1712

18-
### Add the Relay NPM package
13+
### Add the Relay package
1914

2015
Run `npm install hyco-https` from a Node command prompt in your project folder.
2116

@@ -30,14 +25,14 @@ Run `npm install hyco-https` from a Node command prompt in your project folder.
3025
connection details. Replace the placeholders in brackets with the values you
3126
obtained when you created the hybrid connection.
3227

33-
1. `const ns` - The Relay namespace. Be sure to use the fully qualified namespace name; for example, `{namespace}.servicebus.windows.net`.
34-
2. `const path` - The name of the hybrid connection.
35-
3. `const keyrule` - The name of the SAS key.
36-
4. `const key` - The SAS key value.
28+
- `const ns` - The Relay namespace. Be sure to use the fully qualified namespace name; for example, `{namespace}.servicebus.windows.net`.
29+
- `const path` - The name of the hybrid connection.
30+
- `const keyrule` - Name of your Shared Access Policies key, which is `RootManageSharedAccessKey` by default.
31+
- `const key` - The primary key of the namespace you saved earlier.
3732

3833
3. Add the following code to the `listener.js` file. :
3934

40-
You will notice that the code is not much different from any simple HTTP server
35+
You notice that the code isn't much different from any simple HTTP server
4136
example you can find in Node.js beginner tutorials, which the exception of
4237
using the `createRelayedServer` instead of the typical `createServer`
4338
function.
@@ -66,7 +61,7 @@ Run `npm install hyco-https` from a Node command prompt in your project folder.
6661
console.log('error: ' + err);
6762
});
6863
```
69-
Here is what your listener.js file should look like:
64+
Here's what your listener.js file should look like:
7065

7166
```js
7267
const https = require('hyco-https');

articles/azure-relay/includes/relay-hybrid-connections-node-get-started-client.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ author: clemensv
33
ms.service: service-bus-relay
44
ms.topic: include
55
ms.date: 01/04/2024
6-
ms.author: clemensv
6+
ms.author: samurp
77
---
88
### Create a Node.js application
99

1010
Create a new JavaScript file called `sender.js`.
1111

12-
### Add the Relay NPM package
12+
### Add the Relay Node Package Manager package
1313

1414
Run `npm install hyco-ws` from a Node command prompt in your project folder.
1515

@@ -27,10 +27,10 @@ Run `npm install hyco-ws` from a Node command prompt in your project folder.
2727
```
2828
2. Add the following constants to the `sender.js` file for the hybrid connection details. Replace the placeholders in brackets with the values you obtained when you created the hybrid connection.
2929

30-
1. `const ns` - The Relay namespace. Be sure to use the fully qualified namespace name; for example, `{namespace}.servicebus.windows.net`.
31-
2. `const path` - The name of the hybrid connection.
32-
3. `const keyrule` - The name of the SAS key.
33-
4. `const key` - The SAS key value.
30+
- `const ns` - The Relay namespace. Be sure to use the fully qualified namespace name; for example, `{namespace}.servicebus.windows.net`.
31+
- `const path` - The name of the hybrid connection.
32+
- `const keyrule` - Name of your Shared Access Policies key, which is `RootManageSharedAccessKey` by default.
33+
- `const key` - The primary key of the namespace you saved earlier.
3434

3535
3. Add the following code to the `sender.js` file:
3636

articles/azure-relay/includes/relay-hybrid-connections-node-get-started-server.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ ms.topic: include
55
ms.date: 01/04/2024
66
ms.author: clemensv
77
---
8+
89
### Create a Node.js application
910

1011
Create a new JavaScript file called `listener.js`.
1112

12-
### Add the Relay NPM package
13+
### Add the Relay package
1314

1415
Run `npm install hyco-ws` from a Node command prompt in your project folder.
1516

@@ -22,10 +23,10 @@ Run `npm install hyco-ws` from a Node command prompt in your project folder.
2223
```
2324
2. Add the following constants to the `listener.js` file for the hybrid connection details. Replace the placeholders in brackets with the values you obtained when you created the hybrid connection.
2425

25-
1. `const ns` - The Relay namespace. Be sure to use the fully qualified namespace name; for example, `{namespace}.servicebus.windows.net`.
26-
2. `const path` - The name of the hybrid connection.
27-
3. `const keyrule` - The name of the SAS key.
28-
4. `const key` - The SAS key value.
26+
- `const ns` - The Relay namespace. Be sure to use the fully qualified namespace name; for example, `{namespace}.servicebus.windows.net`.
27+
- `const path` - The name of the hybrid connection.
28+
- `const keyrule` - Name of your Shared Access Policies key, which is `RootManageSharedAccessKey` by default.
29+
- `const key` - The primary key of the namespace you saved earlier.
2930

3031
3. Add the following code to the `listener.js` file:
3132

0 commit comments

Comments
 (0)