0

We're using a python event hub consumer client that reads from a topic containing 32 partitions.

We've enabled checkpointing as per the documentation (that seems to work). Events get consumed via a singular client.

The velocity of these small json payloads is less than 1000 per day.

The problem we run into is that the consumer seemingly seems to skip some events (roughly 10-15% at times). Simple logging of the event body verifies that not all events that go into the queue come out the other end.

When we restart the application, the missed events get picked up.

When setting up a new consumer group and just printing all events held by the retention period also shows no missing events.

We're at our wit's end trying to figure out what's going on.

            with eh_client:
                eh_client.receive_batch(
                    on_event_batch=get_msg, #print event
                    on_error=handle_error, # print error
                    starting_position="-1",
                    max_batch_size=1
                )
Havnar
  • 2,558
  • 7
  • 33
  • 62
  • can you share some more of your code as to how checkpointing is done ? It would also be great if you can turn on DEBUG logging and pass in logging_enable=True in to the client as per here https://learn.microsoft.com/en-us/azure/developer/python/sdk/azure-sdk-logging – Kashif Khan Aug 21 '23 at 13:18
  • 1
    Can you help us understand how you're determining that messages were missed? If you're only looking at the payload, how are you verifying that the issue is not a publisher problem? Is your consumer seeing `EventData` instances where the sequence number jumps by more than 1? – Jesse Squire Aug 21 '23 at 13:36
  • We have a log file of the source system where we can see what was sent to the queue. when we set up a new consumer we do see all messages. @JesseSquire – Havnar Aug 22 '23 at 07:38
  • This seems like something that will require some discussion and investigation. I'd suggest opening an issue in the Azure SDK for Python repository so that the right folks can be looped in to assist. https://github.com/Azure/azure-sdk-for-python/issues – Jesse Squire Aug 22 '23 at 13:03

0 Answers0