azure-messaging
Troubleshoot Azure Messaging SDK Issues
This skill helps developers diagnose and fix Azure Event Hubs and Service Bus SDK problems including connection failures, authentication errors, message processing issues, and configuration questions across Python, Java, JavaScript, and .NET SDKs.
Download the skill ZIP
Upload in Claude
Go to Settings → Capabilities → Skills → Upload skill
Toggle on and start using
Test it
Using "azure-messaging". EventHubsException: The connection was closed unexpectedly when receiving events
Expected outcome:
This error typically indicates the EventProcessorClient was disposed or the AMQP connection was lost. Common causes: 1) Unhandled exception in event handler - ensure all exceptions are caught. 2) Process crash - host your processor in a stable environment. 3) Network interruption - implement retry logic. Check our documentation for proper event handler implementation and connection recovery patterns.
Using "azure-messaging". Service Bus message lock lost immediately after processing
Expected outcome:
Message lock loss can occur if: 1) You complete the message before async processing finishes - use await. 2) The handler throws an unhandled exception. 3) The lock duration is too short for your processing time. Solution: Increase lock duration via QueueDescription.LockDuration, implement try-catch in your handler, and consider using PeekLock mode with explicit complete/abandon.
Security Audit
SafeThis is a Microsoft-official troubleshooting reference skill containing only documentation and example commands for debugging Azure Event Hubs and Service Bus SDK issues. All static findings are false positives: code fences (backticks) are markdown examples, URLs point to official Microsoft documentation, and diagnostic commands are standard troubleshooting tools. No executable code or malicious patterns detected.
Quality Score
What You Can Build
Fix Event Hub connection failures
Developer encountering connection timeout or authentication errors when connecting to Azure Event Hubs from their application
Resolve Service Bus message processing issues
Engineer dealing with message lock lost errors, dead letter queue problems, or session handling issues in Azure Service Bus
Configure Event Processor for production
Team optimizing their Event Hub consumer application for high throughput with proper checkpointing and retry configuration
Try These Prompts
I am getting this error when using Azure Event Hubs: [ERROR_MESSAGE]. Help me understand what it means and how to fix it.
My Service Bus client is failing with unauthorized access. I am using [AUTH_METHOD] in [LANGUAGE] SDK. Check my configuration and suggest fixes.
My Azure messaging client cannot connect. The error is [ERROR]. Help me troubleshoot connectivity issues including firewall and network configuration.
I want to optimize my Event Hub consumer for high throughput. Current setup: [DESCRIBE_CURRENT_CONFIG]. Help me tune retry, prefetch, and checkpoint settings.
Best Practices
- TreatHubClient Event as a singleton - creating new clients for each operation causes socket exhaustion and performance issues
- Configure appropriate retry policies using SDK retry options to handle transient failures gracefully
- Enable SDK logging with debug/verbose level to capture detailed diagnostic information for troubleshooting
Avoid
- Do not create new client instances for each message or operation - reuse the same client across your application
- Avoid disabling retry policies unless you have specific requirements - transient failures are common in cloud messaging
- Do not ignore exception types - different failure reasons require different handling strategies
Frequently Asked Questions
What languages does this skill support?
Does this skill create Event Hubs or Service Bus resources?
How do I enable verbose logging for debugging?
Why am I getting quota exceeded errors?
How do I configure WebSocket connections?
What is checkpointing and how do I configure it?
Developer Details
Author
microsoftLicense
MIT
Repository
https://github.com/microsoft/github-copilot-for-azure/tree/main/plugin/skills/azure-messaging/Ref
main