Closed davidwmartines closed 6 years ago
That makes sense. Currently the EPH checkpoints on behalf of the customer every time a lease is renewed. I shall make it customizable.
There is a tradeoff between checkpointing and balancing EPH instances across partitions. If checkpointing is delayed, then when another instance of EPH (say eph2) starts, it will receive checkpoint info that is relatively older than what the current EPH instance(say eph1) is currently receiving. Thus eph2 will receive some messages that were already received by eph1. Thus you would need additional metadata in your application that would indicate that the message was already processed or the effect of processing a message should be idempotent.
azure-event-processor-host@0.1.4
has been published where you can disable auto checkpointing by setting autoCheckpoint: false
as one of the options while creating the EPH.
Confirmed autoCheckpoint: false
working as requested. Thanks!
Is your feature request related to a problem? Please describe. Current offset gets saved during lease renewal, which happens outside scope of message handling, even if message handling code does not call context.checkpoint(). This could happen if messageHandler takes some time to process and eventually gets an error, in which case we don't want to checkpoint the current offset, so that we can fix the issue, restart the EPH and try to process that event again.
Describe the solution you'd like Some option on EPH to prevent the offset from being saved as part of the lease renewal, so the burden of checkpointing is strictly on the user. This way I can be sure current offset is only committed when I call context.checkpoint() after all processing of the event has completed successfully.