Azure Service Bus for TypeScript
Build enterprise messaging workflows with Azure Service Bus.
The skill uses DefaultAzureCredential, managed identity, and environment-based authentication, supporting credential isolation. It also discloses receive-and-delete message-loss risk and documents resource closure and DLQ patterns. Points were deducted because least-privilege RBAC, sensitive-message log redaction, external data flows, user confirmation, and rollback are not systematically specified, and examples print message bodies.
The documentation covers sending, receiving, sessions, DLQs, retries, lock renewal, and graceful shutdown, with reasonably broad error guidance. Static evidence has material uncertainty: the batching example creates newBatch without replacing batch, deferred-message parameter examples are inconsistent, and some SDK behavior lacks versioned or reproducible support. The static cap prevents a score above10, so points were deducted.
The audience and scenarios are clear, covering queues, topics, subscriptions, sessions, and enterprise messaging patterns. Points were deducted for missing explicit non-fit boundaries, input/output contracts, trigger conditions, version-compatibility scope, Chinese-language support, and mainland-China network reachability guidance.
The skill has front matter, an MIT license, a version, installation and environment-variable instructions, layered reference documents, and topic-focused examples; the repository also supplies license, security, CI, and maintenance signals. Points were deducted because there is no skill-specific changelog, explicit maintainer and update path, FAQ, troubleshooting entry point, or pinned dependency guidance.
The examples can help an agent implement common Service Bus integrations and provide directly adaptable TypeScript patterns, including reliability practices. Points were deducted because the examples require manual validation and contain potentially incorrect or incomplete handling; entity provisioning, RBAC setup, tests, serialization constraints, and production deployment details remain outside the skill. Static calibration limits this dimension to7.
The repository includes a general test harness, Vitest tests, and CI workflows, providing some quality-assurance evidence. Points were deducted because the supplied material does not show that these tests cover this Service Bus skill's key paths, nor does it provide skill-specific acceptance criteria, third-party execution results, or corroborating evidence types. Static calibration limits this dimension to5.
- Fix the batching example so the newly created batch replaces batch, and standardize receiveDeferredMessages, scheduleMessages, and related API parameter forms.
- Before production use, verify package versions, least-privilege RBAC, lock-renewal behavior, and auto-completion semantics.
- Avoid logging complete message bodies or session state; add guidance for sensitive data, retry idempotency, rollback, and user confirmation.
- Add skill-specific acceptance tests, verified SDK versions, known limitations, maintainer ownership, and an update path.
What it does & when to use it
This skill helps JavaScript and TypeScript developers build applications with Azure Service Bus. It covers queues, topics and subscriptions, message sessions, dead-letter queues, scheduled delivery, deferral, and non-destructive peeking. Examples use @azure/service-bus with Microsoft Entra credentials from @azure/identity. It is a good fit for Azure applications that need established enterprise messaging patterns.
It shows how to install @azure/service-bus and @azure/identity, configure Service Bus namespace, queue, topic, and subscription environment variables, and create a ServiceBusClient. The examples send single or batched messages to queues and topics, receive and settle messages, subscribe with event-driven callbacks, manage session state, process dead-letter messages, schedule and cancel delivery, defer messages, and peek without removing them. It also documents Peek-Lock and Receive-and-Delete modes, client reuse, resource cleanup, and error callbacks.
- A TypeScript developer building an order or workflow system that needs to publish work to an Azure Service Bus queue.
- An event-driven application that distributes events such as order.created through topics and subscriptions.
- A workflow processor that must preserve message ordering within a business or workflow group using sessions.
- A message consumer that needs batch receiving plus completion, abandonment, deferral, or dead-letter handling.
- An Azure application that needs scheduled delivery or queue inspection without removing messages.
Pros & cons
- Covers queues, topic subscriptions, sessions, dead-lettering, scheduled messages, deferral, and peeking.
- Includes adaptable TypeScript examples for batch sending and event-driven receiving.
- Gives concrete credential guidance for local development and production managed identities.
- The README reports 14 test scenarios for azure-servicebus-ts.
- Targets JavaScript/TypeScript and the @azure/service-bus SDK rather than other Azure SDK languages.
- Requires an Azure Service Bus resource and a configured Microsoft Entra authentication setup.
- Provides focused patterns rather than a complete project scaffold, deployment configuration, or full troubleshooting guide.
- The referenced queues-topics.md and error-handling.md documents are not included in the supplied material.
How to install
Install the collection through Copilot CLI or another supported Agent Skills workflow with: npx skills add microsoft/skills. Select azure-servicebus-ts in the wizard; skills are installed to the chosen agent directory, such as .github/skills/ for GitHub Copilot. The README does not document a separate command for installing only this skill. Install the runtime packages in the project with: npm install @azure/service-bus @azure/identity.
How to use
After loading the skill into a coding Agent, use a request such as: “Implement a TypeScript Azure Service Bus queue consumer using Microsoft Entra authentication, with completion, dead-letter handling, and an error callback.” Set SERVICEBUS_NAMESPACE, SERVICEBUS_QUEUE_NAME, and the other relevant variables. For production use of DefaultAzureCredential, set AZURE_TOKEN_CREDENTIALS=prod or select a specific credential. Create the required sender, receiver, or session receiver, and close resources when finished.