Skip to content

Commit 5a958f6

Browse files
[Service Bus] Samples and Readme updates for GA (Azure#12668)
1 parent f517fe4 commit 5a958f6

32 files changed

+5
-133
lines changed

sdk/servicebus/service-bus/README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@ Resources for the v7.0.0 of `@azure/service-bus`:
1616
[Product documentation](https://azure.microsoft.com/services/service-bus/) |
1717
[Samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/servicebus/service-bus/samples)
1818

19-
Samples for v1 and documentation are still available here:
20-
21-
[Source code or Readme for v1.1.10](https://github.com/Azure/azure-sdk-for-js/tree/%40azure/service-bus_1.1.10/sdk/servicebus/service-bus) |
22-
[Package for v1.1.10 (npm)](https://www.npmjs.com/package/@azure/service-bus/v/1.1.10) |
23-
[API Reference Documentation for v1.1.10](https://docs.microsoft.com/javascript/api/%40azure/service-bus/?view=azure-node-latest) |
24-
[Samples for @azure/service-bus v1.1.x](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/servicebus/service-bus/samples-v1)
25-
2619
**NOTE**: If you are using version 1.1.10 or lower and want to migrate to the latest version
2720
of this package please look at our [migration guide to move from Service Bus V1 to Service Bus V7][migrationguide]
2821

@@ -240,8 +233,7 @@ for await (let message of receiver.getMessageIterator()) {
240233

241234
### Settle a message
242235

243-
Once you receive a message you can call `complete()`, `abandon()`, `defer()` or `deadletter()` on it
244-
based on how you want to settle the message.
236+
Once you receive a message you can call `completeMessage()`, `abandonMessage()`, `deferMessage()` or `deadletterMessage()` on the receiver based on how you want to settle the message.
245237

246238
To learn more, please read [Settling Received Messages](https://docs.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#settling-receive-operations)
247239

sdk/servicebus/service-bus/samples/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Getting started with samples
22

3-
**NOTE**: Samples for @azure/service-bus v1.1.x are available [here](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/servicebus/service-bus/samples-v1)
4-
53
## Install the library
64

75
There are three ways to work with the samples.

sdk/servicebus/service-bus/samples/javascript/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Azure Service Bus client library samples for JavaScript
22

3-
**NOTE**: Samples for @azure/service-bus v1.1.x are still available [here](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/servicebus/service-bus/samples-v1)
4-
53
These sample programs show how to use the JavaScript client libraries for Azure Service Bus in some common scenarios.
64

75
| **File Name** | **Description** |

sdk/servicebus/service-bus/samples/javascript/advanced/administrationClient.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
Copyright (c) Microsoft Corporation. All rights reserved.
33
Licensed under the MIT Licence.
44
5-
**NOTE**: This sample uses the preview of the next version (v7) of the @azure/service-bus package.
6-
For samples using the current stable version (v1) of the package, please use the link below:
7-
https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/servicebus/service-bus/samples-v1
8-
95
This sample demonstrates how the ServiceBusAdministrationClient can be used to manage the resources of a service bus namespace.
106
117
See https://docs.microsoft.com/rest/api/servicebus/resource-provider-apis to learn more.

sdk/servicebus/service-bus/samples/javascript/advanced/deferral.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
Copyright (c) Microsoft Corporation. All rights reserved.
33
Licensed under the MIT Licence.
44
5-
**NOTE**: This sample uses the preview of the next version (v7) of the @azure/service-bus package.
6-
For samples using the current stable version (v1) of the package, please use the link below:
7-
https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/servicebus/service-bus/samples-v1
8-
95
This sample demonstrates how the defer() function can be used to defer a message for later processing.
106
117
In this sample, we have an application that gets cooking instructions out of order. It uses

sdk/servicebus/service-bus/samples/javascript/advanced/listingEntities.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
Copyright (c) Microsoft Corporation. All rights reserved.
33
Licensed under the MIT Licence.
44
5-
**NOTE**: This sample uses the preview of the next version (v7) of the @azure/service-bus package.
6-
For samples using the current stable version (v1) of the package, please use the link below:
7-
https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/servicebus/service-bus/samples-v1
8-
95
This sample demonstrates how the ServiceBusAdministrationClient can be used to list the entities of a service bus namespace.
106
117
See https://docs.microsoft.com/rest/api/servicebus/resource-provider-apis to learn more.

sdk/servicebus/service-bus/samples/javascript/advanced/movingMessagesToDLQ.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
Copyright (c) Microsoft Corporation. All rights reserved.
33
Licensed under the MIT Licence.
44
5-
**NOTE**: This sample uses the preview of the next version (v7) of the @azure/service-bus package.
6-
For samples using the current stable version (v1) of the package, please use the link below:
7-
https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/servicebus/service-bus/samples-v1
8-
95
This sample demonstrates scenarios as to how a Service Bus message can be explicitly moved to
106
the DLQ. For other implicit ways when Service Bus messages get moved to DLQ, refer to -
117
https://docs.microsoft.com/azure/service-bus-messaging/service-bus-dead-letter-queues

sdk/servicebus/service-bus/samples/javascript/advanced/processMessageFromDLQ.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
Copyright (c) Microsoft Corporation. All rights reserved.
33
Licensed under the MIT Licence.
44
5-
**NOTE**: This sample uses the preview of the next version (v7) of the @azure/service-bus package.
6-
For samples using the current stable version (v1) of the package, please use the link below:
7-
https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/servicebus/service-bus/samples-v1
8-
95
This sample demonstrates retrieving a message from a dead letter queue, editing it and
106
sending it back to the main queue.
117

sdk/servicebus/service-bus/samples/javascript/advanced/sessionState.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
Copyright (c) Microsoft Corporation. All rights reserved.
33
Licensed under the MIT Licence.
44
5-
**NOTE**: This sample uses the preview of the next version (v7) of the @azure/service-bus package.
6-
For samples using the current stable version (v1) of the package, please use the link below:
7-
https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/servicebus/service-bus/samples-v1
8-
95
This sample demonstrates usage of SessionState.
106
117
We take for example the context of an online shopping app and see how we can use Session State
@@ -135,9 +131,7 @@ async function processMessageFromSession(sessionId) {
135131
}
136132

137133
console.log(
138-
`Received message: Customer '${sessionReceiver.sessionId}': '${messages[0].body.event_name} ${
139-
messages[0].body.event_details
140-
}'`
134+
`Received message: Customer '${sessionReceiver.sessionId}': '${messages[0].body.event_name} ${messages[0].body.event_details}'`
141135
);
142136
await sessionReceiver.completeMessage(messages[0]);
143137
} else {

sdk/servicebus/service-bus/samples/javascript/browseMessages.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
Copyright (c) Microsoft Corporation. All rights reserved.
33
Licensed under the MIT Licence.
44
5-
**NOTE**: This sample uses the preview of the next version (v7) of the @azure/service-bus package.
6-
For samples using the current stable version (v1) of the package, please use the link below:
7-
https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/servicebus/service-bus/samples-v1
8-
95
This sample demonstrates how the peekMessages() function can be used to browse a Service Bus message.
106
117
See https://docs.microsoft.com/azure/service-bus-messaging/message-browsing to learn

0 commit comments

Comments
 (0)