[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JMJ1RHBZMSGGT7BZ2YTK2T":3,"skill-same:01M6JMJ1RHBZMSGGT7BZ2YTK2T":93},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":53,"ownerHtmlUrl":54,"ownerBlogUrl":55,"ownerDescription":6,"updatedAt":56,"install":57,"resources":70},"01M6JMJ1RHBZMSGGT7BZ2YTK2T","azure_eventhub_java",null,"Build real-time streaming applications with Azure Event Hubs SDK for Java. Use when implementing event streaming, high-throughput data ingestion, or building event-driven architectures.","LongLeo287\u002FOmniClaw","LongLeo287","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F141803367?v=4","01M6JK75C62VCNZKR5BRZ386YV","LongLeo","01M6JK75GQ78TSP1ZPXNKK3MCH",9,"MIT","https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fskills\u002Fazure_eventhub_java\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"azure eventhub java","java","azure","for","implementing","high","with","event","throughput","azure event hubs","architectures","time","ingestion","use","applications","real-time","data","messaging","data ingestion","streaming","2026-11-10 10:12:30",false,"---\nname: azure_eventhub_java\n\ndescription: Build real-time streaming applications with Azure Event Hubs SDK for Java. Use when implementing event streaming, high-throughput data ingestion, or building event-driven architectures.\nlicense: MIT\nmetadata:\n  author: Microsoft\n  version: \"1.0.0\"\n  package: com.azure:azure-messaging-eventhubs\n---\n\n# Azure Event Hubs SDK for Java\n\nBuild real-time streaming applications using the Azure Event Hubs SDK for Java.\n\n## Installation\n\n```xml\n\u003Cdependency>\n    \u003CgroupId>com.azure\u003C\u002FgroupId>\n    \u003CartifactId>azure-messaging-eventhubs\u003C\u002FartifactId>\n    \u003Cversion>5.19.0\u003C\u002Fversion>\n\u003C\u002Fdependency>\n\n\u003C!-- For checkpoint store (production) -->\n\u003Cdependency>\n    \u003CgroupId>com.azure\u003C\u002FgroupId>\n    \u003CartifactId>azure-messaging-eventhubs-checkpointstore-blob\u003C\u002FartifactId>\n    \u003Cversion>1.20.0\u003C\u002Fversion>\n\u003C\u002Fdependency>\n```\n\n## Client Creation\n\n### EventHubProducerClient\n\n```java\nimport com.azure.messaging.eventhubs.EventHubProducerClient;\nimport com.azure.messaging.eventhubs.EventHubClientBuilder;\n\n\u002F\u002F With connection string\nEventHubProducerClient producer = new EventHubClientBuilder()\n    .connectionString(\"\u003Cconnection-string>\", \"\u003Cevent-hub-name>\")\n    .buildProducerClient();\n\n\u002F\u002F Full connection string with EntityPath\nEventHubProducerClient producer = new EventHubClientBuilder()\n    .connectionString(\"\u003Cconnection-string-with-entity-path>\")\n    .buildProducerClient();\n```\n\n### With DefaultAzureCredential\n\n```java\nimport com.azure.identity.DefaultAzureCredentialBuilder;\n\nEventHubProducerClient producer = new EventHubClientBuilder()\n    .fullyQualifiedNamespace(\"\u003Cnamespace>.servicebus.windows.net\")\n    .eventHubName(\"\u003Cevent-hub-name>\")\n    .credential(new DefaultAzureCredentialBuilder().build())\n    .buildProducerClient();\n```\n\n### EventHubConsumerClient\n\n```java\nimport com.azure.messaging.eventhubs.EventHubConsumerClient;\n\nEventHubConsumerClient consumer = new EventHubClientBuilder()\n    .connectionString(\"\u003Cconnection-string>\", \"\u003Cevent-hub-name>\")\n    .consumerGroup(EventHubClientBuilder.DEFAULT_CONSUMER_GROUP_NAME)\n    .buildConsumerClient();\n```\n\n### Async Clients\n\n```java\nimport com.azure.messaging.eventhubs.EventHubProducerAsyncClient;\nimport com.azure.messaging.eventhubs.EventHubConsumerAsyncClient;\n\nEventHubProducerAsyncClient asyncProducer = new EventHubClientBuilder()\n    .connectionString(\"\u003Cconnection-string>\", \"\u003Cevent-hub-name>\")\n    .buildAsyncProducerClient();\n\nEventHubConsumerAsyncClient asyncConsumer = new EventHubClientBuilder()\n    .connectionString(\"\u003Cconnection-string>\", \"\u003Cevent-hub-name>\")\n    .consumerGroup(\"$Default\")\n    .buildAsyncConsumerClient();\n```\n\n## Core Patterns\n\n### Send Single Event\n\n```java\nimport com.azure.messaging.eventhubs.EventData;\n\nEventData eventData = new EventData(\"Hello, Event Hubs!\");\nproducer.send(Collections.singletonList(eventData));\n```\n\n### Send Event Batch\n\n```java\nimport com.azure.messaging.eventhubs.EventDataBatch;\nimport com.azure.messaging.eventhubs.models.CreateBatchOptions;\n\n\u002F\u002F Create batch\nEventDataBatch batch = producer.createBatch();\n\n\u002F\u002F Add events (returns false if batch is full)\nfor (int i = 0; i \u003C 100; i++) {\n    EventData event = new EventData(\"Event \" + i);\n    if (!batch.tryAdd(event)) {\n        \u002F\u002F Batch is full, send and create new batch\n        producer.send(batch);\n        batch = producer.createBatch();\n        batch.tryAdd(event);\n    }\n}\n\n\u002F\u002F Send remaining events\nif (batch.getCount() > 0) {\n    producer.send(batch);\n}\n```\n\n### Send to Specific Partition\n\n```java\nCreateBatchOptions options = new CreateBatchOptions()\n    .setPartitionId(\"0\");\n\nEventDataBatch batch = producer.createBatch(options);\nbatch.tryAdd(new EventData(\"Partition 0 event\"));\nproducer.send(batch);\n```\n\n### Send with Partition Key\n\n```java\nCreateBatchOptions options = new CreateBatchOptions()\n    .setPartitionKey(\"customer-123\");\n\nEventDataBatch batch = producer.createBatch(options);\nbatch.tryAdd(new EventData(\"Customer event\"));\nproducer.send(batch);\n```\n\n### Event with Properties\n\n```java\nEventData event = new EventData(\"Order created\");\nevent.getProperties().put(\"orderId\", \"ORD-123\");\nevent.getProperties().put(\"customerId\", \"CUST-456\");\nevent.getProperties().put(\"priority\", 1);\n\nproducer.send(Collections.singletonList(event));\n```\n\n### Receive Events (Simple)\n\n```java\nimport com.azure.messaging.eventhubs.models.EventPosition;\nimport com.azure.messaging.eventhubs.models.PartitionEvent;\n\n\u002F\u002F Receive from specific partition\nIterable\u003CPartitionEvent> events = consumer.receiveFromPartition(\n    \"0\",                           \u002F\u002F partitionId\n    10,                            \u002F\u002F maxEvents\n    EventPosition.earliest(),      \u002F\u002F startingPosition\n    Duration.ofSeconds(30)         \u002F\u002F timeout\n);\n\nfor (PartitionEvent partitionEvent : events) {\n    EventData event = partitionEvent.getData();\n    System.out.println(\"Body: \" + event.getBodyAsString());\n    System.out.println(\"Sequence: \" + event.getSequenceNumber());\n    System.out.println(\"Offset: \" + event.getOffset());\n}\n```\n\n### EventProcessorClient (Production)\n\n```java\nimport com.azure.messaging.eventhubs.EventProcessorClient;\nimport com.azure.messaging.eventhubs.EventProcessorClientBuilder;\nimport com.azure.messaging.eventhubs.checkpointstore.blob.BlobCheckpointStore;\nimport com.azure.storage.blob.BlobContainerAsyncClient;\nimport com.azure.storage.blob.BlobContainerClientBuilder;\n\n\u002F\u002F Create checkpoint store\nBlobContainerAsyncClient blobClient = new BlobContainerClientBuilder()\n    .connectionString(\"\u003Cstorage-connection-string>\")\n    .containerName(\"checkpoints\")\n    .buildAsyncClient();\n\n\u002F\u002F Create processor\nEventProcessorClient processor = new EventProcessorClientBuilder()\n    .connectionString(\"\u003Ceventhub-connection-string>\", \"\u003Cevent-hub-name>\")\n    .consumerGroup(\"$Default\")\n    .checkpointStore(new BlobCheckpointStore(blobClient))\n    .processEvent(eventContext -> {\n        EventData event = eventContext.getEventData();\n        System.out.println(\"Processing: \" + event.getBodyAsString());\n        \n        \u002F\u002F Checkpoint after processing\n        eventContext.updateCheckpoint();\n    })\n    .processError(errorContext -> {\n        System.err.println(\"Error: \" + errorContext.getThrowable().getMessage());\n        System.err.println(\"Partition: \" + errorContext.getPartitionContext().getPartitionId());\n    })\n    .buildEventProcessorClient();\n\n\u002F\u002F Start processing\nprocessor.start();\n\n\u002F\u002F Keep running...\nThread.sleep(Duration.ofMinutes(5).toMillis());\n\n\u002F\u002F Stop gracefully\nprocessor.stop();\n```\n\n### Batch Processing\n\n```java\nEventProcessorClient processor = new EventProcessorClientBuilder()\n    .connectionString(\"\u003Cconnection-string>\", \"\u003Cevent-hub-name>\")\n    .consumerGroup(\"$Default\")\n    .checkpointStore(new BlobCheckpointStore(blobClient))\n    .processEventBatch(eventBatchContext -> {\n        List\u003CEventData> events = eventBatchContext.getEvents();\n        System.out.printf(\"Received %d events%n\", events.size());\n        \n        for (EventData event : events) {\n            \u002F\u002F Process each event\n            System.out.println(event.getBodyAsString());\n        }\n        \n        \u002F\u002F Checkpoint after batch\n        eventBatchContext.updateCheckpoint();\n    }, 50) \u002F\u002F maxBatchSize\n    .processError(errorContext -> {\n        System.err.println(\"Error: \" + errorContext.getThrowable());\n    })\n    .buildEventProcessorClient();\n```\n\n### Async Receiving\n\n```java\nasyncConsumer.receiveFromPartition(\"0\", EventPosition.latest())\n    .subscribe(\n        partitionEvent -> {\n            EventData event = partitionEvent.getData();\n            System.out.println(\"Received: \" + event.getBodyAsString());\n        },\n        error -> System.err.println(\"Error: \" + error),\n        () -> System.out.println(\"Complete\")\n    );\n```\n\n### Get Event Hub Properties\n\n```java\n\u002F\u002F Get hub info\nEventHubProperties hubProps = producer.getEventHubProperties();\nSystem.out.println(\"Hub: \" + hubProps.getName());\nSystem.out.println(\"Partitions: \" + hubProps.getPartitionIds());\n\n\u002F\u002F Get partition info\nPartitionProperties partitionProps = producer.getPartitionProperties(\"0\");\nSystem.out.println(\"Begin sequence: \" + partitionProps.getBeginningSequenceNumber());\nSystem.out.println(\"Last sequence: \" + partitionProps.getLastEnqueuedSequenceNumber());\nSystem.out.println(\"Last offset: \" + partitionProps.getLastEnqueuedOffset());\n```\n\n## Event Positions\n\n```java\n\u002F\u002F Start from beginning\nEventPosition.earliest()\n\n\u002F\u002F Start from end (new events only)\nEventPosition.latest()\n\n\u002F\u002F From specific offset\nEventPosition.fromOffset(12345L)\n\n\u002F\u002F From specific sequence number\nEventPosition.fromSequenceNumber(100L)\n\n\u002F\u002F From specific time\nEventPosition.fromEnqueuedTime(Instant.now().minus(Duration.ofHours(1)))\n```\n\n## Error Handling\n\n```java\nimport com.azure.messaging.eventhubs.models.ErrorContext;\n\n.processError(errorContext -> {\n    Throwable error = errorContext.getThrowable();\n    String partitionId = errorContext.getPartitionContext().getPartitionId();\n    \n    if (error instanceof AmqpException) {\n        AmqpException amqpError = (AmqpException) error;\n        if (amqpError.isTransient()) {\n            System.out.println(\"Transient error, will retry\");\n        }\n    }\n    \n    System.err.printf(\"Error on partition %s: %s%n\", partitionId, error.getMessage());\n})\n```\n\n## Resource Cleanup\n\n```java\n\u002F\u002F Always close clients\ntry {\n    producer.send(batch);\n} finally {\n    producer.close();\n}\n\n\u002F\u002F Or use try-with-resources\ntry (EventHubProducerClient producer = new EventHubClientBuilder()\n        .connectionString(connectionString, eventHubName)\n        .buildProducerClient()) {\n    producer.send(events);\n}\n```\n\n## Environment Variables\n\n```bash\nEVENT_HUBS_CONNECTION_STRING=Endpoint=sb:\u002F\u002F\u003Cnamespace>.servicebus.windows.net\u002F;SharedAccessKeyName=...\nEVENT_HUBS_NAME=\u003Cevent-hub-name>\nSTORAGE_CONNECTION_STRING=\u003Cfor-checkpointing>\n```\n\n## Best Practices\n\n1. **Use EventProcessorClient**: For production, provides load balancing and checkpointing\n2. **Batch Events**: Use `EventDataBatch` for efficient sending\n3. **Partition Keys**: Use for ordering guarantees within a partition\n4. **Checkpointing**: Checkpoint after processing to avoid reprocessing\n5. **Error Handling**: Handle transient errors with retries\n6. **Close Clients**: Always close producer\u002Fconsumer when done\n\n## Trigger Phrases\n\n- \"Event Hubs Java\"\n- \"event streaming Azure\"\n- \"real-time data ingestion\"\n- \"EventProcessorClient\"\n- \"event hub producer consumer\"\n- \"partition processing\"\n","# Azure Event Hubs SDK for Java\n\nBuild real-time streaming applications using the Azure Event Hubs SDK for Java.\n\n## Installation\n\n```xml\n\u003Cdependency>\n    \u003CgroupId>com.azure\u003C\u002FgroupId>\n    \u003CartifactId>azure-messaging-eventhubs\u003C\u002FartifactId>\n    \u003Cversion>5.19.0\u003C\u002Fversion>\n\u003C\u002Fdependency>\n\n\u003C!-- For checkpoint store (production) -->\n\u003Cdependency>\n    \u003CgroupId>com.azure\u003C\u002FgroupId>\n    \u003CartifactId>azure-messaging-eventhubs-checkpointstore-blob\u003C\u002FartifactId>\n    \u003Cversion>1.20.0\u003C\u002Fversion>\n\u003C\u002Fdependency>\n```\n\n## Client Creation\n\n### EventHubProducerClient\n\n```java\nimport com.azure.messaging.eventhubs.EventHubProducerClient;\nimport com.azure.messaging.eventhubs.EventHubClientBuilder;\n\n\u002F\u002F With connection string\nEventHubProducerClient producer = new EventHubClientBuilder()\n    .connectionString(\"\u003Cconnection-string>\", \"\u003Cevent-hub-name>\")\n    .buildProducerClient();\n\n\u002F\u002F Full connection string with EntityPath\nEventHubProducerClient producer = new EventHubClientBuilder()\n    .connectionString(\"\u003Cconnection-string-with-entity-path>\")\n    .buildProducerClient();\n```\n\n### With DefaultAzureCredential\n\n```java\nimport com.azure.identity.DefaultAzureCredentialBuilder;\n\nEventHubProducerClient producer = new EventHubClientBuilder()\n    .fullyQualifiedNamespace(\"\u003Cnamespace>.servicebus.windows.net\")\n    .eventHubName(\"\u003Cevent-hub-name>\")\n    .credential(new DefaultAzureCredentialBuilder().build())\n    .buildProducerClient();\n```\n\n### EventHubConsumerClient\n\n```java\nimport com.azure.messaging.eventhubs.EventHubConsumerClient;\n\nEventHubConsumerClient consumer = new EventHubClientBuilder()\n    .connectionString(\"\u003Cconnection-string>\", \"\u003Cevent-hub-name>\")\n    .consumerGroup(EventHubClientBuilder.DEFAULT_CONSUMER_GROUP_NAME)\n    .buildConsumerClient();\n```\n\n### Async Clients\n\n```java\nimport com.azure.messaging.eventhubs.EventHubProducerAsyncClient;\nimport com.azure.messaging.eventhubs.EventHubConsumerAsyncClient;\n\nEventHubProducerAsyncClient asyncProducer = new EventHubClientBuilder()\n    .connectionString(\"\u003Cconnection-string>\", \"\u003Cevent-hub-name>\")\n    .buildAsyncProducerClient();\n\nEventHubConsumerAsyncClient asyncConsumer = new EventHubClientBuilder()\n    .connectionString(\"\u003Cconnection-string>\", \"\u003Cevent-hub-name>\")\n    .consumerGroup(\"$Default\")\n    .buildAsyncConsumerClient();\n```\n\n## Core Patterns\n\n### Send Single Event\n\n```java\nimport com.azure.messaging.eventhubs.EventData;\n\nEventData eventData = new EventData(\"Hello, Event Hubs!\");\nproducer.send(Collections.singletonList(eventData));\n```\n\n### Send Event Batch\n\n```java\nimport com.azure.messaging.eventhubs.EventDataBatch;\nimport com.azure.messaging.eventhubs.models.CreateBatchOptions;\n\n\u002F\u002F Create batch\nEventDataBatch batch = producer.createBatch();\n\n\u002F\u002F Add events (returns false if batch is full)\nfor (int i = 0; i \u003C 100; i++) {\n    EventData event = new EventData(\"Event \" + i);\n    if (!batch.tryAdd(event)) {\n        \u002F\u002F Batch is full, send and create new batch\n        producer.send(batch);\n        batch = producer.createBatch();\n        batch.tryAdd(event);\n    }\n}\n\n\u002F\u002F Send remaining events\nif (batch.getCount() > 0) {\n    producer.send(batch);\n}\n```\n\n### Send to Specific Partition\n\n```java\nCreateBatchOptions options = new CreateBatchOptions()\n    .setPartitionId(\"0\");\n\nEventDataBatch batch = producer.createBatch(options);\nbatch.tryAdd(new EventData(\"Partition 0 event\"));\nproducer.send(batch);\n```\n\n### Send with Partition Key\n\n```java\nCreateBatchOptions options = new CreateBatchOptions()\n    .setPartitionKey(\"customer-123\");\n\nEventDataBatch batch = producer.createBatch(options);\nbatch.tryAdd(new EventData(\"Customer event\"));\nproducer.send(batch);\n```\n\n### Event with Properties\n\n```java\nEventData event = new EventData(\"Order created\");\nevent.getProperties().put(\"orderId\", \"ORD-123\");\nevent.getProperties().put(\"customerId\", \"CUST-456\");\nevent.getProperties().put(\"priority\", 1);\n\nproducer.send(Collections.singletonList(event));\n```\n\n### Receive Events (Simple)\n\n```java\nimport com.azure.messaging.eventhubs.models.EventPosition;\nimport com.azure.messaging.eventhubs.models.PartitionEvent;\n\n\u002F\u002F Receive from specific partition\nIterable\u003CPartitionEvent> events = consumer.receiveFromPartition(\n    \"0\",                           \u002F\u002F partitionId\n    10,                            \u002F\u002F maxEvents\n    EventPosition.earliest(),      \u002F\u002F startingPosition\n    Duration.ofSeconds(30)         \u002F\u002F timeout\n);\n\nfor (PartitionEvent partitionEvent : events) {\n    EventData event = partitionEvent.getData();\n    System.out.println(\"Body: \" + event.getBodyAsString());\n    System.out.println(\"Sequence: \" + event.getSequenceNumber());\n    System.out.println(\"Offset: \" + event.getOffset());\n}\n```\n\n### EventProcessorClient (Production)\n\n```java\nimport com.azure.messaging.eventhubs.EventProcessorClient;\nimport com.azure.messaging.eventhubs.EventProcessorClientBuilder;\nimport com.azure.messaging.eventhubs.checkpointstore.blob.BlobCheckpointStore;\nimport com.azure.storage.blob.BlobContainerAsyncClient;\nimport com.azure.storage.blob.BlobContainerClientBuilder;\n\n\u002F\u002F Create checkpoint store\nBlobContainerAsyncClient blobClient = new BlobContainerClientBuilder()\n    .connectionString(\"\u003Cstorage-connection-string>\")\n    .containerName(\"checkpoints\")\n    .buildAsyncClient();\n\n\u002F\u002F Create processor\nEventProcessorClient processor = new EventProcessorClientBuilder()\n    .connectionString(\"\u003Ceventhub-connection-string>\", \"\u003Cevent-hub-name>\")\n    .consumerGroup(\"$Default\")\n    .checkpointStore(new BlobCheckpointStore(blobClient))\n    .processEvent(eventContext -> {\n        EventData event = eventContext.getEventData();\n        System.out.println(\"Processing: \" + event.getBodyAsString());\n        \n        \u002F\u002F Checkpoint after processing\n        eventContext.updateCheckpoint();\n    })\n    .processError(errorContext -> {\n        System.err.println(\"Error: \" + errorContext.getThrowable().getMessage());\n        System.err.println(\"Partition: \" + errorContext.getPartitionContext().getPartitionId());\n    })\n    .buildEventProcessorClient();\n\n\u002F\u002F Start processing\nprocessor.start();\n\n\u002F\u002F Keep running...\nThread.sleep(Duration.ofMinutes(5).toMillis());\n\n\u002F\u002F Stop gracefully\nprocessor.stop();\n```\n\n### Batch Processing\n\n```java\nEventProcessorClient processor = new EventProcessorClientBuilder()\n    .connectionString(\"\u003Cconnection-string>\", \"\u003Cevent-hub-name>\")\n    .consumerGroup(\"$Default\")\n    .checkpointStore(new BlobCheckpointStore(blobClient))\n    .processEventBatch(eventBatchContext -> {\n        List\u003CEventData> events = eventBatchContext.getEvents();\n        System.out.printf(\"Received %d events%n\", events.size());\n        \n        for (EventData event : events) {\n            \u002F\u002F Process each event\n            System.out.println(event.getBodyAsString());\n        }\n        \n        \u002F\u002F Checkpoint after batch\n        eventBatchContext.updateCheckpoint();\n    }, 50) \u002F\u002F maxBatchSize\n    .processError(errorContext -> {\n        System.err.println(\"Error: \" + errorContext.getThrowable());\n    })\n    .buildEventProcessorClient();\n```\n\n### Async Receiving\n\n```java\nasyncConsumer.receiveFromPartition(\"0\", EventPosition.latest())\n    .subscribe(\n        partitionEvent -> {\n            EventData event = partitionEvent.getData();\n            System.out.println(\"Received: \" + event.getBodyAsString());\n        },\n        error -> System.err.println(\"Error: \" + error),\n        () -> System.out.println(\"Complete\")\n    );\n```\n\n### Get Event Hub Properties\n\n```java\n\u002F\u002F Get hub info\nEventHubProperties hubProps = producer.getEventHubProperties();\nSystem.out.println(\"Hub: \" + hubProps.getName());\nSystem.out.println(\"Partitions: \" + hubProps.getPartitionIds());\n\n\u002F\u002F Get partition info\nPartitionProperties partitionProps = producer.getPartitionProperties(\"0\");\nSystem.out.println(\"Begin sequence: \" + partitionProps.getBeginningSequenceNumber());\nSystem.out.println(\"Last sequence: \" + partitionProps.getLastEnqueuedSequenceNumber());\nSystem.out.println(\"Last offset: \" + partitionProps.getLastEnqueuedOffset());\n```\n\n## Event Positions\n\n```java\n\u002F\u002F Start from beginning\nEventPosition.earliest()\n\n\u002F\u002F Start from end (new events only)\nEventPosition.latest()\n\n\u002F\u002F From specific offset\nEventPosition.fromOffset(12345L)\n\n\u002F\u002F From specific sequence number\nEventPosition.fromSequenceNumber(100L)\n\n\u002F\u002F From specific time\nEventPosition.fromEnqueuedTime(Instant.now().minus(Duration.ofHours(1)))\n```\n\n## Error Handling\n\n```java\nimport com.azure.messaging.eventhubs.models.ErrorContext;\n\n.processError(errorContext -> {\n    Throwable error = errorContext.getThrowable();\n    String partitionId = errorContext.getPartitionContext().getPartitionId();\n    \n    if (error instanceof AmqpException) {\n        AmqpException amqpError = (AmqpException) error;\n        if (amqpError.isTransient()) {\n            System.out.println(\"Transient error, will retry\");\n        }\n    }\n    \n    System.err.printf(\"Error on partition %s: %s%n\", partitionId, error.getMessage());\n})\n```\n\n## Resource Cleanup\n\n```java\n\u002F\u002F Always close clients\ntry {\n    producer.send(batch);\n} finally {\n    producer.close();\n}\n\n\u002F\u002F Or use try-with-resources\ntry (EventHubProducerClient producer = new EventHubClientBuilder()\n        .connectionString(connectionString, eventHubName)\n        .buildProducerClient()) {\n    producer.send(events);\n}\n```\n\n## Environment Variables\n\n```bash\nEVENT_HUBS_CONNECTION_STRING=Endpoint=sb:\u002F\u002F\u003Cnamespace>.servicebus.windows.net\u002F;SharedAccessKeyName=...\nEVENT_HUBS_NAME=\u003Cevent-hub-name>\nSTORAGE_CONNECTION_STRING=\u003Cfor-checkpointing>\n```\n\n## Best Practices\n\n1. **Use EventProcessorClient**: For production, provides load balancing and checkpointing\n2. **Batch Events**: Use `EventDataBatch` for efficient sending\n3. **Partition Keys**: Use for ordering guarantees within a partition\n4. **Checkpointing**: Checkpoint after processing to avoid reprocessing\n5. **Error Handling**: Handle transient errors with retries\n6. **Close Clients**: Always close producer\u002Fconsumer when done\n\n## Trigger Phrases\n\n- \"Event Hubs Java\"\n- \"event streaming Azure\"\n- \"real-time data ingestion\"\n- \"EventProcessorClient\"\n- \"event hub producer consumer\"\n- \"partition processing\"\n",{"name":5,"license":15,"metadata":44,"description":7},{"author":45,"package":46,"version":47},"Microsoft","com.azure:azure-messaging-eventhubs","1.0.0","main","c173cdffe08e788a99b91928a831b476b8434838","ecosystem\u002Fskills\u002Fazure_eventhub_java",0,"https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw","https:\u002F\u002Fportfolio-longleo.vercel.app\u002Flabs\u002Fomniclaw.html","https:\u002F\u002Fgithub.com\u002FLongLeo287","https:\u002F\u002Fwww.facebook.com\u002FResourceRookie2023","2026-09-30 00:58:05",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add LongLeo287\u002FOmniClaw --skill azure_eventhub_java",{"tool":63,"command":64},"bunx","bunx skills add LongLeo287\u002FOmniClaw --skill azure_eventhub_java",{"tool":66,"command":67},"pnpm","pnpm dlx skills add LongLeo287\u002FOmniClaw --skill azure_eventhub_java","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fskills\u002Fazure_eventhub_java\u002FSKILL.md",true,[71,77,81,85,89],{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"_DIR_IDENTITY.md","REFERENCE","参考文档",160,"https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fskills\u002Fazure_eventhub_java\u002F_DIR_IDENTITY.md",{"path":78,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":79,"sourceHtmlUrl":80},"README.md",473,"https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fskills\u002Fazure_eventhub_java\u002FREADME.md",{"path":82,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Facceptance_criteria.md",12756,"https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fskills\u002Fazure_eventhub_java\u002Freferences\u002Facceptance_criteria.md",{"path":86,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fexamples.md",13281,"https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fskills\u002Fazure_eventhub_java\u002Freferences\u002Fexamples.md",{"path":90,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":91,"sourceHtmlUrl":92},"schema.json",459,"https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fskills\u002Fazure_eventhub_java\u002Fschema.json",[94,137,156,182,198,224],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":116,"publishedAt":39},"01M6JR0KQP4MHT32TN40D9CBFX","UI-UX Pro Max","Advanced UI\u002FUX analysis and generation skills with data-driven patterns. Python scripts (core.py, search.py) for systematic UI pattern extraction, design system generation, and component search from curated data sources.","https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fui_components\u002Fui_ux_pro_max\u002FSKILL.md",[100,105,108,113],{"categoryNo":101,"categoryName":102,"taxonomyType":103,"taxonomyTypeDesc":104},"01JBSEEDCAT000000000000015","视觉设计","SCENARIO","使用场景",{"categoryNo":106,"categoryName":107,"taxonomyType":103,"taxonomyTypeDesc":104},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":109,"categoryName":110,"taxonomyType":111,"taxonomyTypeDesc":112},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",{"categoryNo":114,"categoryName":115,"taxonomyType":111,"taxonomyTypeDesc":112},"01JBSEEDCAT000000000000033","数据分析师",[117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136],"ux","ui","ui ux pro max","max","pro","ui ux","design","component","search","analysis","team","rd","ui-ux","active","systematic","scripts","pattern extraction","sources","advanced","data-driven",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":144,"publishedAt":39},"01M6JR0EF5AEQHP2FSTB57H05P","shadcn-ui","Expert guidance for integrating and building applications with shadcn\u002Fui components, including component discovery, installation, customization, and best practices.","https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fui_components\u002Fshadcn_ui\u002FSKILL.md",[143],{"categoryNo":109,"categoryName":110,"taxonomyType":111,"taxonomyTypeDesc":112},[145,118,146,147,124,148,149,33,150,127,151,152,153,130,154,155,25,22],"shadcn","shadcn ui","components","core","best practices","discovery","customization","guidance","expert","installation","ui components",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":165,"publishedAt":39},"01M6JR08F51BEN17RHFYX65WVE","zustand_store_ts","Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state\u002Faction separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.","https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fskills\u002Fzustand_store_ts\u002FSKILL.md",[162],{"categoryNo":163,"categoryName":164,"taxonomyType":103,"taxonomyTypeDesc":104},"01JBSEEDCAT000000000000009","前端开发",[166,167,168,169,170,171,172,173,174,175,176,177,32,178,179,180,25,181,23],"zustand store ts","zustand","store","typescript","microsoft","react","create","state management","state","react state management","management","global","patterns","separation","middleware","action",{"skillNo":183,"name":167,"nameZh":6,"description":184,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":185,"categories":186,"keywords":187,"publishedAt":39},"01M6JR00TDMVAFFCZXZ04AN7Q7","Zustand state management guide. Use when working with store code (src\u002Fstore\u002F**), implementing actions, managing state, or creating slices. Triggers on Zustand store development, state management questions, or action implementation.","https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fskills\u002Fzustand\u002FSKILL.md",[],[167,188,173,189,174,190,191,176,192,32,193,194,195,168,25,196,197,181,23],"development","code","actions","src","guide","implementation","zustand state","triggers","questions","zustand state management",{"skillNo":199,"name":200,"nameZh":6,"description":201,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":202,"categories":203,"keywords":208,"publishedAt":39},"01M6JQZSWV4KWJP112G6XHEP44","youtube_summarizer","Automatically fetch YouTube video transcripts, generate structured summaries, and send full transcripts to messaging platforms. Detects YouTube URLs and provides metadata, key insights, and downloadable transcripts.","https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fskills\u002Fyoutube_summarizer\u002FSKILL.md",[204,207],{"categoryNo":205,"categoryName":206,"taxonomyType":103,"taxonomyTypeDesc":104},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":106,"categoryName":107,"taxonomyType":103,"taxonomyTypeDesc":104},[209,210,211,212,213,36,214,215,216,217,218,219,220,221,222,223],"youtube","youtube summarizer","summarizer","generate","metadata","Video","fetch","telegram","transcription","summarization","structured","full","insights","transcripts","summaries",{"skillNo":225,"name":226,"nameZh":6,"description":227,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":228,"categories":229,"keywords":230,"publishedAt":39},"01M6JQZN3QJB6B77JGKJD62DQT","youtube_clipper","YouTube 视频智能剪辑工具。下载视频和字幕，AI 分析生成精细章节（几分钟级别）， 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频，并生成总结文案。 使用场景：当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词：视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video","https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fskills\u002Fyoutube_clipper\u002FSKILL.md",[],[209,231,232,214,233,234,235,236,237,238,239,240,241,242,243,244,245],"clipper","youtube clipper","Bash","下载","视频","生成","关键词","翻译","read","write","clip","总结","工具","文案","sonnet"]