Forum Discussion
Duplicate Event-Based Triggers for Same OneLake File Despite Filtering on data.api = FlushWithClose
Hi Team,
We are using a Microsoft Fabric Eventstream source configured with:
- Event Type: Microsoft.Fabric.OneLake.FileCreated
- Subject filter: /Files/people_counting/camera_history/ingest
- Additional filter: data.api = FlushWithClose
However, we are still observing two pipeline triggers for the same file.
For a single file: /Files/people_counting/camera_history/ingest/visitation_people_YYYYMMDDHHMMSS.txt. the Eventstream shows multiple FileCreated events, and the downstream pipeline is triggered twice. Our expectation is that one completed file should result in only one pipeline execution.
Questions:
- Is duplicate triggering a known behavior for Microsoft.Fabric.OneLake.FileCreated events?
- Is filtering on data.api = FlushWithClose sufficient, or are additional filters required?
- Is there a recommended deduplication strategy for Eventstream-triggered Fabric pipelines?
- How can we guarantee exactly one pipeline trigger per file arrival?
Any guidance from the Fabric team or anyone who has implemented OneLake event-based ingestion would be appreciated.
5 Replies
- v-sathmakuri
Community Support
Hi mahadev93 ,
Thank you for reaching out to fabric community.This behavior is expected for Fabric OneLake events. Microsoft documents that Fabric events follow at-least-once delivery, meaning the same event may occasionally be delivered multiple times. The Microsoft.Fabric.OneLake.FileCreated event is also triggered when a file is either created or replaced.
Using data.api = FlushWithClose as a filter can help identify a completed write, but it cannot guarantee exactly-once delivery.
Continue filtering on FileCreated, subject/path, and data.api = FlushWithClose.
Deduplicate events using source + id, which Microsoft identifies as the event's unique identifier.
Ensure the downstream pipeline is idempotent, so reprocessing the same file or event does not produce duplicate results.As a result, Eventstream filtering alone cannot guarantee exactly one pipeline execution per file. The recommended solution is to combine event deduplication with idempotent file processing.
Fabric OneLake Events in Fabric Real-Time Hub - Microsoft Fabric | Microsoft Learn
Events delivery guarantees - Microsoft Fabric | Microsoft Learn
Thanks!!
- mahadev93New Member
Thanks for the workaround. However, this is quite complex for a basic event-based ingestion scenario. Implementing claim, deduplication, status tracking, concurrency handling, and completion logic in every pipeline creates significant overhead.
The expected behavior should ideally be: One completed file → One event → One pipeline execution
Is there a simpler built-in option, or is a product-level fix planned for duplicate OneLake file events?
- v-sathmakuri
Community Support
Hi mahadev93 ,
Event stream currently has no built-in option to guarantee exactly once delivery or limit processing to one pipeline execution per file. Microsoft documents Fabric/One Lake events as at-least-once delivery, which means duplicate events may occur.
Although data.api = FlushWithClose can help filter for completed writes, it does not provide exactly-once semantics. The supported approach is to deduplicate events using source + id and ensure processing is idempotent.
To request this feature for future consideration, please submit an idea here ( Fabric Ideas | Microsoft Fabric Community ).
Thanks!!