R2 Event Notifications

Good day,
I need help with the following use case.

I have a pipeline with a stream and a sink. The sink writes incoming events into an R2 bucket as JSON files. Each file rolls over based on either a size limit or a time interval.

I want to trigger a queue message when a file is finalized—for example, when R2 finishes writing file1 and switches to file2. The queue message should contain a reference to the completed file so I can process its contents.

Is there a way to achieve this with R2, or is there an alternative Cloudflare-recommended approach for detecting file rollovers and notifying a queue?
Was this page helpful?