技能 Azure.Messaging.EventHubs (.NET)
📦

Azure.Messaging.EventHubs (.NET)

安全

Build Event Streaming with Azure Event Hubs

This skill helps developers integrate Azure Event Hubs into .NET applications for real-time event streaming, enabling scalable pub-sub messaging and event-driven architectures.

支持: Claude Codex Code(CC)
📊 70 充足
1

下载技能 ZIP

2

在 Claude 中上传

前往 设置 → 功能 → 技能 → 上传技能

3

开启并开始使用

测试它

正在使用“Azure.Messaging.EventHubs (.NET)”。 Show me how to create an Event Hubs producer in .NET

预期结果:

To create an Event Hubs producer in .NET, use the EventHubProducerClient from the Azure.Messaging.EventHubs package. First, install the NuGet package, then create a producer instance with your connection string and hub name. The producer can send single events or batches of events. Remember to dispose of the producer when done or use 'using' statements for automatic cleanup.

正在使用“Azure.Messaging.EventHubs (.NET)”。 Explain partitions and consumer groups in Event Hubs

预期结果:

Partitions are the basic unit of parallelism in Event Hubs. Each partition holds a sequence of events and can be processed independently. Consumer groups are logical subscribers that maintain their own position in the stream. Multiple consumer groups enable different consumers to read the same events independently. For ordered processing, all related events should go to the same partition using a partition key.

安全审计

安全
v1 • 2/24/2026

This is a prompt-only skill with no executable code. The static analyzer scanned 0 files (0 lines) and detected no security issues. The skill provides guidance on Azure Event Hubs .NET SDK usage through prompts and documentation. No dangerous patterns, network requests, filesystem access, environment variable usage, or external command execution were detected.

0
已扫描文件
0
分析行数
0
发现项
1
审计总数
未发现安全问题
审计者: claude

质量评分

38
架构
100
可维护性
87
内容
30
社区
100
安全
83
规范符合性

你能构建什么

Build event-driven microservices

Create loosely coupled microservices that communicate through event streaming for scalable distributed systems

Implement real-time data pipelines

Process streaming data from IoT devices, click streams, or log aggregation in real-time

Modernize legacy messaging systems

Migrate from traditional message queues to event streaming with Event Hubs integration

试试这些提示

Basic event producer
Show me how to create an Event Hubs producer in .NET to send messages to a specific hub.
Event consumer with checkpointing
Create an Event Hubs consumer that processes events and saves checkpoints for reliable processing.
Batch event publishing
Generate code to publish events in batches for better throughput and performance.
Partition routing strategy
Explain how to implement a partition routing strategy for ordered event processing.

最佳实践

  • Use partition keys for related events to maintain ordering within a partition
  • Implement checkpointing in consumers to enable resume after failures
  • Use batch publishing for high-throughput scenarios to reduce network overhead

避免

  • Do not create a new producer for each message - reuse producer instances
  • Avoid processing events synchronously in the receive callback - use async processing
  • Do not ignore the PartitionContext when implementing checkpointing for reliable processing

常见问题

What is Azure Event Hubs?
Azure Event Hubs is a fully managed real-time event streaming service from Microsoft Azure. It can ingest millions of events per second from various sources and deliver them to multiple consumers.
Do I need an Azure account to use this skill?
This skill provides code guidance and examples. To run the generated code, you need an Azure subscription and an Event Hubs namespace with an event hub.
What is the difference between partitions and consumer groups?
Partitions are physical divisions of the event stream that enable parallel processing. Consumer groups are logical views that allow multiple independent consumers to read the same stream at different positions.
How do I handle event ordering?
Events within a single partition are ordered. To maintain ordering across related events, use a partition key when sending events to ensure they go to the same partition.
What is checkpointing?
Checkpointing is the process of saving the position of processed events so that if the consumer restarts, it can resume from where it left off rather than reprocessing all events.
Can this skill help with Azure IoT Hub integration?
Yes, Azure IoT Hub can stream events to Event Hubs using built-in endpoints. This skill can help you create consumers that process these events from the IoT Hub-compatible endpoint.

开发者详情

文件结构

📄 SKILL.md