[BUG] EventProcessorClient not consuming existing messages in the EventHub #43652
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Event Hubs
issue-addressed
Workflow: The Azure SDK team believes it to be addressed and ready to close.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
Created EventProcessorClient exactly as per the code mentioned in this page - https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-java-get-started-send to consume the messages in the EventHub. We have thousands of message already present in the EvenHub, but the EventProcessorClient is consuming only new event messages, not consuming the existing messages that are not consumed before. We tried with EventHub with 3 partitions and 3 consumer pods with same EventProcessorClient code.
Exception or Stack Trace
Add the exception log and stack trace if available
To Reproduce
Steps to reproduce the behavior:
Code Snippet
Exact replica of code in this sample except the eventhub and blob container details - https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples/java/com/azure/messaging/eventhubs/checkpointstore/blob/EventProcessorBlobCheckpointStoreSample.java
also the lines 67 and 70 were commented out as per the Microsoft Support Engineer. Whole java files and logs are attached in the Support request ID - 2412200040008002
Java Code updated as per Microsoft Support Engineer suggestions which used for testing - EventHubReceiver.txt
Expected behavior
The existing event messages from eventhub should be consumed by EvenProcessorClient as per the partition ownership without overlap in consuming message. Each Pod should read from corresponding ownership claimed partition only.
Screenshots
If applicable, add screenshots to help explain your problem.
Setup (please complete the following information):
OS: Windows 10 Enterprise
IDE: IntelliJ
Library/Libraries:
implementation 'com.azure.spring:spring-cloud-azure-starter-eventhubs:5.18.0'
implementation 'com.azure:azure-messaging-eventhubs:5.19.2'
implementation 'com.azure:azure-identity:1.14.2'
implementation 'com.azure:azure-messaging-eventhubs-checkpointstore-blob:1.20.2'
Java version: 21.0.4
App Server/Environment: Tomcat
Frameworks: Spring Boot
If you suspect a dependency version mismatch (e.g. you see
NoClassDefFoundError
,NoSuchMethodError
or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:mvn dependency:tree -Dverbose
)Additional context
Add any other context about the problem here. PFA logs from all 3 pods dev07-ov-buyflow-offline-service-rogers-5d6895697f-ghb94-logs.txt
dev07-ov-buyflow-offline-service-rogers-5fcc4bb589-w8wn2-logs.txt
dev07-ov-buyflow-offline-service-rogers-5fcc4bb589-r67mk-logs.txt
dev07-ov-buyflow-offline-service-rogers-5fcc4bb589-jfq95-logs.txt
dev07-ov-buyflow-offline-service-rogers-5d6895697f-n4wj2-logs.txt
dev07-ov-buyflow-offline-service-rogers-5d6895697f-hd48r-logs.txt
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: