[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6G2CYTJM5AD1XKNDQJE3MB3":3,"skill-same:01M6G2CYTJM5AD1XKNDQJE3MB3":68},{"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":46,"commitSha":47,"skillDirectory":48,"forksCount":14,"repositoryHtmlUrl":49,"repositoryHomepageUrl":6,"ownerHtmlUrl":50,"ownerBlogUrl":51,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M6G2CYTJM5AD1XKNDQJE3MB3","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.","reikiplanet\u002Fdaoskills","reikiplanet","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F96377599?v=4","01M6CVWCMD740YHQDK7E9QYBW4","Reiki Planet","01M6CVWCS4KXVA2CWFVJ43EAXK",0,"MIT","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Fskills\u002Fdevelopment\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","azure eventhub java","java","with","sdk","event","azure event hubs","event-driven","high-throughput","architectures","time","community","build","ingestion","use","applications","real-time","messaging","data ingestion","streaming","2026-11-10 10:12:30",false,"---\nname: azure-eventhub-java\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.\"\npackage: com.azure:azure-messaging-eventhubs\nrisk: unknown\nsource: community\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\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\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\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n",{"name":5,"risk":44,"source":30,"package":45,"description":7},"unknown","com.azure:azure-messaging-eventhubs","master","dff58085da947e81e8418c922055644bf0082b1b","skills\u002Fdevelopment\u002Fazure-eventhub-java","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills","https:\u002F\u002Fgithub.com\u002Freikiplanet","https:\u002F\u002Fwww.reiki-planet.com","Reiki Planet Game","2026-03-29 06:02:29",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add reikiplanet\u002Fdaoskills --skill azure-eventhub-java",{"tool":60,"command":61},"bunx","bunx skills add reikiplanet\u002Fdaoskills --skill azure-eventhub-java",{"tool":63,"command":64},"pnpm","pnpm dlx skills add reikiplanet\u002Fdaoskills --skill azure-eventhub-java","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Fskills\u002Fdevelopment\u002Fazure-eventhub-java\u002FSKILL.md",true,[],[69,95,107,120,139,162],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":39},"01M6G614JTEQJHPT8AKK3YQ18S","web-games","Web browser game development principles. Framework selection, WebGPU, optimization, PWA.","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Fweb-games\u002FSKILL.md",[],[76,77,78,79,80,81,30,82,83,84,85,86,87,88,89,90,91,92,93,94],"games","web games","web","grep","principles","selection","framework selection","edit","write","read","pwa","game","web browser","game development","Optimization","framework","browser","development","webgpu",{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":39},"01M6G611H2YGV0GZFP90D38ZMJ","vr-ar","VR\u002FAR development principles. Comfort, interaction, performance requirements.","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Fvr-ar\u002FSKILL.md",[],[102,103,93,104,105,30,83,84,85,79,106,80],"ar","vr ar","interaction","requirements","performance",{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":39},"01M6G60XNMHAMV1SV0EJ1CX0AY","templates","Project scaffolding templates for new applications. Use when creating new projects from scratch. Contains 12 templates for various tech stacks.","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Ftemplates\u002FSKILL.md",[],[109,114,115,116,117,118,30,33,85,119,34,79],"project scaffolding","From Scratch","tech","project","scaffolding","projects",{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":39},"01M6G60T0GATMK3Q5H8GDC1Z8S","wcag-audit-patterns","Conduct WCAG 2.2 accessibility audits with automated testing, manual verification, and remediation guidance. Use when auditing websites for accessibility, fixing WCAG violations, or implementing ac...","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Fskills\u002Fsecurity\u002Fwcag-audit-patterns\u002FSKILL.md",[],[127,128,129,130,131,30,132,22,133,134,33,135,136,137,138],"wcag audit patterns","wcag audit","patterns","WCAG","audit","manual","automated testing","guidance","remediation","verification","accessibility","testing",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":39},"01M6G60PMCHW1FRZ63F931QK3R","vulnerability-scanner","Advanced vulnerability analysis principles. OWASP 2025, Supply Chain Security, attack surface mapping, risk prioritization.","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Fskills\u002Fsecurity\u002Fvulnerability-scanner\u002FSKILL.md",[],[146,147,148,149,150,151,152,153,30,85,79,154,80,155,156,157,158,159,160,161],"scanner","vulnerability scanner","vulnerability","prioritization","2025","mapping","chain","supply chain","Bash","analysis","risk","owasp","supply chain security","security","supply","advanced",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":39},"01M6G60JZBB8DK0W3DSG1WNMZK","threat-modeling-expert","Expert in threat modeling methodologies, security architecture review, and risk assessment. Masters STRIDE, PASTA, attack trees, and security requirement extraction. Use for security architecture r...","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Fskills\u002Fsecurity\u002Fthreat-modeling-expert\u002FSKILL.md",[],[169,170,171,172,173,174,175,176,159,33,177,178,179,30,180,181,182,156,183,184],"modeling","threat modeling expert","threat modeling","expert","threat","risk assessment","architecture review","architecture","security architecture review","trees","security architecture","security requirement extraction","assessment","extraction","review","stride"]