How does broke send records to exporters after restart?


#1

Hi,in your documents

Once an exporter is configured, the next time Zeebe is started, the exporter will start receiving records. Note that it is only guaranteed to see records produced from that point on.

but i notice that broker will resend the records after it restart even workflow instance was completed in some days ago.

i can reproduce by truncate all table datas in zeebe-monitor and then restart broker, and then i see some instances already appear in zeebe-monitor

if one process define has uncompleted instances, does zeebe broker will resend all the records such as process define ,process instances about that uncompleted instance?


#2

Hi @aximo, it might be.

When a broker is restarted, it recovers its state by replaying events from the event log, and also examining the last snapshot - which contains in-flight work. This, I believe, includes all the historical events needed to construct the current state of uncompleted instances.

So, I would not be surprised to see them re-exported. Records are guaranteed to be seen at-least-once by exporters; and in the case of failure recovery (including single broker restart), the exporter will see events that have been exported previously if they are part of in-flight state.