0

I've implemented an EventProcessorHost with Java and have the prefetchCount value set but the number of EventData objects passed to my IEventProcessor object never approaches this value (I set it to 200, maxBatch to 100). What drives whether or not the prefetch/max batch values are observed? Is there back pressure monitoring going on? Could I be processing too fast and it doesn't need to prebatch...?

Thanks

user1116536
  • 373
  • 1
  • 5
  • 11
  • Probably the last. It is normal behavior that once you are up-to-date with processing it will present items available. It does not wait to reach to designated values of prefetch count and max batch values. – Peter Bons Aug 16 '17 at 14:52
  • The issues i see is when I set my index back to the beginning of the stream, it still doesn't get the prefetch or maxbatch count. At the beginning of my stream, I'm 100+ million message behind, so there is no way I'm "processing fast enough". – user1116536 Aug 19 '17 at 22:53
  • Are you really sure the messages are indeed of the beginning of the stream? There should be a property on the event, for c# it is [this one](https://learn.microsoft.com/ru-ru/dotnet/api/microsoft.servicebus.messaging.eventdata.enqueuedtimeutc?view=azureservicebus-4.0.0). Do mind that for a given consumer group, once you have read from it you will need to clear the checkpoint data before setting an initial offset will yield the correct result. See https://github.com/Azure/azure-event-hubs/issues/256 – Peter Bons Aug 21 '17 at 13:00
  • Yes, for this functional testing I've set my offset to the start of the stream. I've actually gone back to just the EventHubClient (removed the EPH all together). It seems like when I add a Thread.sleep into my code (1 second) the batchCount goes up, but never above 10 when I have the max / prefetch set as above). – user1116536 Aug 22 '17 at 02:16

0 Answers0