# Build Azure Service Bus Workflows in Python

Reliable queue and topic integrations require correct authentication, settlement, batching, and failure handling. This skill provides practical Python patterns for Azure Service Bus workflows.

## Install

```bash
npx skillstore add sickn33/azure-servicebus-py
```

## Metadata

- Status: approved
- Slug: sickn33-azure-servicebus-py
- Skillstore revision: r2
- Version status: missing
- Tree hash: 4d839453364b93c17072e7575859faca93884f3ba7df38e963146727f472edf1
- Author: sickn33
- GitHub username: sickn33
- License: MIT
- Repository: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/azure-servicebus-py
- Ref: f9e2c34b4f19c7f3e6b0a1e93227b5f77cc12526
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/sickn33-azure-servicebus-py
- Manifest: https://skillstore.pages.dev/api/skills/sickn33-azure-servicebus-py/manifest

## Capabilities

- Configure ServiceBusClient with DefaultAzureCredential and a fully qualified namespace.
- Send individual, batched, topic, session, and scheduled messages with asynchronous Python.
- Receive queue or subscription messages using PEEK\_LOCK or RECEIVE\_AND\_DELETE.
- Complete, abandon, defer, or dead-letter messages according to processing outcomes.
- Use sessions for ordered processing and retrieve dead-lettered messages.
- Adapt examples between asynchronous workflows and simple synchronous scripts.

## Use Cases

- Build a Queue Worker: Create a reliable Python consumer with bounded receives, explicit settlement, retries, and dead-letter handling.
- Design Publish and Subscribe Messaging: Plan topic senders and subscription receivers for event distribution across multiple services.
- Improve Messaging Operations: Add batching, scheduling, sessions, and dead-letter inspection to existing Service Bus workloads.

## Prompt Templates

### Send One Queue Message

```
Create an asynchronous Python example using DefaultAzureCredential to send one message to queue [queue] in namespace [namespace].
```

### Handle Receiver Outcomes

```
Show a receiver for [queue] that completes successes, abandons transient failures, and dead-letters permanent failures.
```

### Design Ordered Event Delivery

```
Design a topic workflow for [event type], including batching, session ordering, receive mode, and resource cleanup decisions.
```

### Review a Production Design

```
Review this Service Bus design: [design]. Identify reliability risks involving locks, retries, dead letters, scheduling, sessions, throughput, and shutdown.
```

## Limitations

- Provides guidance and examples; it does not execute or validate deployments.
- Assumes Azure resources, permissions, and Python dependencies already exist.
- Does not include the referenced setup or advanced pattern files in this package.
- Uses placeholder namespaces and entity names that require environment-specific replacement.

## Best Practices

- Use DefaultAzureCredential and least-privilege roles instead of embedding connection strings.
- Use context managers to close clients, senders, receivers, and credentials.
- Set bounded receive waits and settle each message only after processing finishes.

## Anti Patterns

- Do not complete messages before business processing succeeds.
- Do not use RECEIVE\_AND\_DELETE when retries or loss protection are required.
- Do not reuse placeholder namespaces, entity names, or error handling unchanged in production.

## Security Audit

- Audited at: 2026-07-23T23:02:48.538\+00:00
- Summary: All 37 static findings are false positives caused by Markdown syntax and ordinary Service Bus examples. No prompt injection, command execution, reconnaissance, or malicious intent was found.

## Stats

- Views: 83
- Downloads: 10
- Favorites: 0
- Popularity score: 0
