From 0ea0160718d253ffacec4845432ff7ccd094703c Mon Sep 17 00:00:00 2001 From: HarshCasper Date: Tue, 17 Mar 2026 17:17:17 +0530 Subject: [PATCH 1/5] add Azure Service Bus(Data Operations/Messaging) service doc --- .../azure/services/service-bus-data-plane.mdx | 190 +++++++++++++++++- 1 file changed, 189 insertions(+), 1 deletion(-) diff --git a/src/content/docs/azure/services/service-bus-data-plane.mdx b/src/content/docs/azure/services/service-bus-data-plane.mdx index 7b561058..51723fea 100644 --- a/src/content/docs/azure/services/service-bus-data-plane.mdx +++ b/src/content/docs/azure/services/service-bus-data-plane.mdx @@ -1,11 +1,199 @@ --- title: "Service Bus Data Plane" -description: API coverage for Microsoft.ServiceBus.DataPlane in LocalStack for Azure. +description: Get started with Azure Service Bus Data Plane on LocalStack template: doc --- import AzureFeatureCoverage from "../../../../components/feature-coverage/AzureFeatureCoverage"; +## Introduction + +Azure Service Bus Data Plane APIs let you operate messaging entities through the namespace endpoint directly. +These APIs are useful for programmatic queue, topic, and subscription operations in integration and messaging workflows. +In LocalStack, they are useful for validating data-plane behavior without calling Azure cloud endpoints. + +LocalStack for Azure provides a local environment for building and testing applications that make use of Azure Service Bus Data Plane APIs. +The supported APIs are available on our [API Coverage section](#api-coverage), which provides information on the extent of Service Bus Data Plane integration with LocalStack. + +## Getting started + +This guide is designed for users new to Service Bus Data Plane APIs and assumes basic knowledge of the Azure CLI and our `azlocal` wrapper script. + +Start your LocalStack container using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). + +:::note +As an alternative to using the `azlocal` CLI, users can run: + +`azlocal start-interception` + +This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator API. +To revert this configuration, run: + +`azlocal stop-interception` + +This reconfigures the `az` CLI to send commands to the official Azure management REST API. At this time, there is no full parity between `azlocal` and `az` commands after running `az start-interception`. Therefore, this technique is not fully interchangeable. +::: + +### Create a resource group + +Create a resource group for your Service Bus resources: + +```bash +azlocal group create \ + --name rg-servicebus-dp-demo \ + --location westeurope +``` + +```bash title="Output" +{ + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-servicebus-dp-demo", + "location": "westeurope", + "name": "rg-servicebus-dp-demo", + "properties": { + "provisioningState": "Succeeded" + }, + ... +} +``` + +### Create a Service Bus namespace + +Create a namespace and capture its data-plane endpoint: + +```bash +azlocal servicebus namespace create \ + --resource-group rg-servicebus-dp-demo \ + --name sbnsdoc84 \ + --location westeurope \ + --sku Standard +``` + +```bash title="Output" +{ + "name": "sbnsdoc84", + "serviceBusEndpoint": "https://sbnsdoc84.localhost.localstack.cloud:4511", + "provisioningState": "Succeeded", + ... +} +``` + +Store the HTTP endpoint for data-plane REST calls: + +```bash +SB_ENDPOINT="http://sbnsdoc84.localhost.localstack.cloud:4511" +``` + +### Create and inspect a queue entity + +Create a queue via the data-plane Entity `Put` API: + +```bash +curl -s -X PUT "$SB_ENDPOINT/dpqueue?api-version=2017-04" \ + -H "Content-Type: application/atom+xml;type=entry;charset=utf-8" \ + -d 'dpqueue' +``` + +```xml title="Output" + + + dpqueue + + + Active + ... + + + +``` + +Get the queue entity via Entity `Get`: + +```bash +curl -s -X GET "$SB_ENDPOINT/dpqueue?api-version=2017-04" +``` + +```xml title="Output" + + + dpqueue + + + 0 + Active + ... + + + +``` + +### Create and inspect a topic subscription + +Create a topic entity: + +```bash +curl -s -X PUT "$SB_ENDPOINT/dptopic?api-version=2017-04" \ + -H "Content-Type: application/atom+xml;type=entry;charset=utf-8" \ + -d 'dptopic' +``` + +Create a subscription via Subscription `Put`: + +```bash +curl -s -X PUT "$SB_ENDPOINT/dptopic/subscriptions/dpsub?api-version=2017-04" \ + -H "Content-Type: application/atom+xml;type=entry;charset=utf-8" \ + -d 'dpsub' +``` + +```xml title="Output" + + + dpsub + + + Active + 10 + ... + + + +``` + +Get the subscription via Subscription `Get`: + +```bash +curl -s -X GET "$SB_ENDPOINT/dptopic/subscriptions/dpsub?api-version=2017-04" +``` + +```xml title="Output" + + + dpsub + + + 0 + Active + ... + + + +``` + +### Delete subscription and entities + +Delete the subscription via Subscription `Delete`: + +```bash +curl -s -X DELETE "$SB_ENDPOINT/dptopic/subscriptions/dpsub?api-version=2017-04" +``` + +Delete entities via Entity `Delete`: + +```bash +curl -s -X DELETE "$SB_ENDPOINT/dptopic?api-version=2017-04" + +curl -s -X DELETE "$SB_ENDPOINT/dpqueue?api-version=2017-04" +``` + ## API Coverage From e1cacba4574ba0783240aba8600f04d94cd98492 Mon Sep 17 00:00:00 2001 From: HarshCasper Date: Thu, 9 Apr 2026 16:32:37 +0530 Subject: [PATCH 2/5] add Features, Limitations, and Samples sections to Service Bus Data Plane doc Address PR review feedback from paolosalvatori and bblommers by adding sections covering emulator capabilities, known limitations, and sample projects before the API Coverage section. Made-with: Cursor --- .../azure/services/service-bus-data-plane.mdx | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/content/docs/azure/services/service-bus-data-plane.mdx b/src/content/docs/azure/services/service-bus-data-plane.mdx index 51723fea..6c988caf 100644 --- a/src/content/docs/azure/services/service-bus-data-plane.mdx +++ b/src/content/docs/azure/services/service-bus-data-plane.mdx @@ -194,6 +194,39 @@ curl -s -X DELETE "$SB_ENDPOINT/dptopic?api-version=2017-04" curl -s -X DELETE "$SB_ENDPOINT/dpqueue?api-version=2017-04" ``` +## Features + +The emulator includes the following core capabilities: + +- **Data Plane REST API**: Supports message-level operations, including Send, Receive, and Peek. +- **Control Plane REST API**: Enables CRUD operations for namespaces and messaging entities (queues, topics, and subscriptions) via Azure Resource Manager (ARM). +- **Multiple Authentication Modes**: Supports both Connection String and Managed Identity authentication. +- **Containerized Deployment**: Runs as a lightweight, Linux-based Docker container. +- **Cross-Platform Compatibility**: Fully compatible with Windows, macOS, and Linux environments. +- **Flexible Configuration**: Manage Service Bus entities via the Service Bus Administration Client or through JSON-based configuration files. +- **Advanced Streaming**: Supports message streaming via the Advanced Message Queuing Protocol (AMQP). + +## Limitations + +The current version of the emulator does **not** support the following: + +- **Protocols**: JMS protocol streaming and AMQP Web Sockets (AMQP over TCP is the only supported transport). +- **Messaging Patterns**: Transactions, auto-forwarding (queue chaining), and message lock renewal. +- **Validation**: Enforcements such as maximum entity counts or maximum message sizes. +- **Metrics**: Property-based message counts for queues, topics, and subscriptions may be inaccurate. + +The following Azure-native features are currently unavailable in the emulator: + +- **Scaling & Resiliency**: Autoscale, Geo-disaster recovery, and Large Message support. +- **Monitoring**: Visual metrics, alerts, and telemetry dashboards. + +## Samples + +Explore the following samples to get started with Service Bus on LocalStack: + +- [Azure Functions App with Service Bus Messaging](https://github.com/localstack/localstack-azure-samples/blob/main/samples/function-app-service-bus/dotnet/) +- [Azure Service Bus with Spring Boot](https://github.com/localstack/localstack-azure-samples/tree/main/samples/servicebus/java) + ## API Coverage From 49f27a51eeae709d874a47a4dadbe504aefbde6a Mon Sep 17 00:00:00 2001 From: HarshCasper Date: Thu, 9 Apr 2026 16:43:18 +0530 Subject: [PATCH 3/5] final fixes --- .../azure/services/service-bus-data-plane.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/content/docs/azure/services/service-bus-data-plane.mdx b/src/content/docs/azure/services/service-bus-data-plane.mdx index 6c988caf..a95249b8 100644 --- a/src/content/docs/azure/services/service-bus-data-plane.mdx +++ b/src/content/docs/azure/services/service-bus-data-plane.mdx @@ -19,20 +19,20 @@ The supported APIs are available on our [API Coverage section](#api-coverage), w This guide is designed for users new to Service Bus Data Plane APIs and assumes basic knowledge of the Azure CLI and our `azlocal` wrapper script. -Start your LocalStack container using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). +Launch LocalStack using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). Once the container is running, enable Azure CLI interception by running: -:::note -As an alternative to using the `azlocal` CLI, users can run: - -`azlocal start-interception` +```bash +azlocal start-interception +``` This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator API. To revert this configuration, run: -`azlocal stop-interception` +```bash +azlocal stop-interception +``` -This reconfigures the `az` CLI to send commands to the official Azure management REST API. At this time, there is no full parity between `azlocal` and `az` commands after running `az start-interception`. Therefore, this technique is not fully interchangeable. -::: +This reconfigures the `az` CLI to send commands to the official Azure management REST API. ### Create a resource group From 2d9a863667bcd2419f9c309a782dc9e6ae7c2bed Mon Sep 17 00:00:00 2001 From: Harsh Mishra Date: Thu, 9 Apr 2026 17:10:24 +0530 Subject: [PATCH 4/5] Apply suggestions from code review Co-authored-by: Paolo Salvatori --- .../azure/services/service-bus-data-plane.mdx | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src/content/docs/azure/services/service-bus-data-plane.mdx b/src/content/docs/azure/services/service-bus-data-plane.mdx index a95249b8..9daef72f 100644 --- a/src/content/docs/azure/services/service-bus-data-plane.mdx +++ b/src/content/docs/azure/services/service-bus-data-plane.mdx @@ -9,7 +9,7 @@ import AzureFeatureCoverage from "../../../../components/feature-coverage/AzureF ## Introduction Azure Service Bus Data Plane APIs let you operate messaging entities through the namespace endpoint directly. -These APIs are useful for programmatic queue, topic, and subscription operations in integration and messaging workflows. +This data plane REST API allows for direct interaction with queues, topics, and subscriptions. It supports core messaging operations including sending, peeking, and receiving messages, as well as batch processing. For more information, see [Azure Service Bus REST API](https://learn.microsoft.com/rest/api/servicebus/service-bus-runtime-rest). In LocalStack, they are useful for validating data-plane behavior without calling Azure cloud endpoints. LocalStack for Azure provides a local environment for building and testing applications that make use of Azure Service Bus Data Plane APIs. @@ -227,6 +227,39 @@ Explore the following samples to get started with Service Bus on LocalStack: - [Azure Functions App with Service Bus Messaging](https://github.com/localstack/localstack-azure-samples/blob/main/samples/function-app-service-bus/dotnet/) - [Azure Service Bus with Spring Boot](https://github.com/localstack/localstack-azure-samples/tree/main/samples/servicebus/java) +## Features + +The emulator includes the following core capabilities: + +- **Data Plane REST API**: Supports message-level operations, including Send, Receive, and Peek. +- **Control Plane REST API**: Enables CRUD operations for namespaces and messaging entities (queues, topics, and subscriptions) via Azure Resource Manager (ARM). +- **Multiple Authentication Modes**: Supports both Connection String and Managed Identity authentication. +- **Containerized Deployment**: Runs as a lightweight, Linux-based Docker container. +- **Cross-Platform Compatibility**: Fully compatible with Windows, macOS, and Linux environments. +- **Flexible Configuration**: Manage Service Bus entities via the Service Bus Administration Client or through JSON-based configuration files. +- **Advanced Streaming**: Supports message streaming via the Advanced Message Queuing Protocol (AMQP). + +## Limitations + +The current version of the emulator does **not** support the following: + +- **Protocols**: JMS protocol streaming and AMQP Web Sockets (AMQP over TCP is the only supported transport). +- **Messaging Patterns**: Transactions, auto-forwarding (queue chaining), and message lock renewal. +- **Validation**: Enforcements such as maximum entity counts or maximum message sizes. +- **Metrics**: Property-based message counts for queues, topics, and subscriptions may be inaccurate. + +The following Azure-native features are currently unavailable in the emulator: + +- **Scaling & Resiliency**: Autoscale, Geo-disaster recovery, and Large Message support. +- **Monitoring**: Visual metrics, alerts, and telemetry dashboards. + +## Samples + +Explore the following samples to get started with Service Bus on LocalStack: + +- [Azure Functions App with Service Bus Messaging](https://github.com/localstack/localstack-azure-samples/blob/main/samples/function-app-service-bus/dotnet/) +- [Azure Service Bus with Spring Boot](https://github.com/localstack/localstack-azure-samples/tree/main/samples/servicebus/java) + ## API Coverage From c0fd8f0c5db6337464fa879641cd90a0d2c09894 Mon Sep 17 00:00:00 2001 From: HarshCasper Date: Thu, 9 Apr 2026 17:13:54 +0530 Subject: [PATCH 5/5] final fixes --- .../azure/services/service-bus-data-plane.mdx | 37 +------------------ 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/src/content/docs/azure/services/service-bus-data-plane.mdx b/src/content/docs/azure/services/service-bus-data-plane.mdx index 9daef72f..82e10cd4 100644 --- a/src/content/docs/azure/services/service-bus-data-plane.mdx +++ b/src/content/docs/azure/services/service-bus-data-plane.mdx @@ -39,7 +39,7 @@ This reconfigures the `az` CLI to send commands to the official Azure management Create a resource group for your Service Bus resources: ```bash -azlocal group create \ +az group create \ --name rg-servicebus-dp-demo \ --location westeurope ``` @@ -61,7 +61,7 @@ azlocal group create \ Create a namespace and capture its data-plane endpoint: ```bash -azlocal servicebus namespace create \ +az servicebus namespace create \ --resource-group rg-servicebus-dp-demo \ --name sbnsdoc84 \ --location westeurope \ @@ -227,39 +227,6 @@ Explore the following samples to get started with Service Bus on LocalStack: - [Azure Functions App with Service Bus Messaging](https://github.com/localstack/localstack-azure-samples/blob/main/samples/function-app-service-bus/dotnet/) - [Azure Service Bus with Spring Boot](https://github.com/localstack/localstack-azure-samples/tree/main/samples/servicebus/java) -## Features - -The emulator includes the following core capabilities: - -- **Data Plane REST API**: Supports message-level operations, including Send, Receive, and Peek. -- **Control Plane REST API**: Enables CRUD operations for namespaces and messaging entities (queues, topics, and subscriptions) via Azure Resource Manager (ARM). -- **Multiple Authentication Modes**: Supports both Connection String and Managed Identity authentication. -- **Containerized Deployment**: Runs as a lightweight, Linux-based Docker container. -- **Cross-Platform Compatibility**: Fully compatible with Windows, macOS, and Linux environments. -- **Flexible Configuration**: Manage Service Bus entities via the Service Bus Administration Client or through JSON-based configuration files. -- **Advanced Streaming**: Supports message streaming via the Advanced Message Queuing Protocol (AMQP). - -## Limitations - -The current version of the emulator does **not** support the following: - -- **Protocols**: JMS protocol streaming and AMQP Web Sockets (AMQP over TCP is the only supported transport). -- **Messaging Patterns**: Transactions, auto-forwarding (queue chaining), and message lock renewal. -- **Validation**: Enforcements such as maximum entity counts or maximum message sizes. -- **Metrics**: Property-based message counts for queues, topics, and subscriptions may be inaccurate. - -The following Azure-native features are currently unavailable in the emulator: - -- **Scaling & Resiliency**: Autoscale, Geo-disaster recovery, and Large Message support. -- **Monitoring**: Visual metrics, alerts, and telemetry dashboards. - -## Samples - -Explore the following samples to get started with Service Bus on LocalStack: - -- [Azure Functions App with Service Bus Messaging](https://github.com/localstack/localstack-azure-samples/blob/main/samples/function-app-service-bus/dotnet/) -- [Azure Service Bus with Spring Boot](https://github.com/localstack/localstack-azure-samples/tree/main/samples/servicebus/java) - ## API Coverage