Azure Eventhub, pausing capture looses events when restarted

Nicholas Ross 0 Reputation points
2023-09-09T09:47:45.78+00:00

Setup:

Mysql DB with Java front end sending compressed and encrypted messaged to eventhub. All fine here. EventHub Capture is every 5 mins sending Avro with all messages to Storage account.

For maintenance and upgrades it is sometimes necessary to pause Capture, the issue we appear to have is when we switch on Capture we loose the first set of messages/ those that are stored on the Eventhub between capture off and on. The Avros in size do not exceed the file size to be transmitted and the messages are well within purge date/time of keeping messages.

This obviously gives us an issue where we miss critical messages. Not sure what additional info is required to investigate but some pointers would be very helpful please.

Thanks

Nick

Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
641 questions
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA-MSFT 89,646 Reputation points Microsoft Employee
    2023-09-11T12:09:42.7733333+00:00

    @Nicholas Ross - Thanks for the question and using MS Q&A platform.

    It sounds like you are experiencing data loss when you pause and resume Event Hub Capture. This can happen if there are messages in the Event Hub that are not captured before Capture is paused, and those messages are lost when Capture is resumed.

    One way to avoid this issue is to use Event Hub checkpoints. Checkpoints allow you to keep track of the last message that was successfully processed by your consumer application. When you resume Capture, you can use the checkpoint to start processing messages from where you left off.

    Azure Event Hubs Checkpoint Store can be used for storing checkpoints while processing events from Azure Event Hubs.To use checkpoints, you need to enable them in your consumer application. Here is an example of how to use checkpoints in Java: Azure Event Hubs Checkpoint Store client library for Java - version 1.16.9.

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.