runConsumer

source

runConsumer<T extends ManualConsumer<T>>(consumerFactory: ManualConsumerFactoryFn<T>): Promise<T>source

Use a manual consumer to replay and ingest events from the message bus. Finds and applies the latest snapshot, then all changes newer than that snapshot. Resolves with the manual consumer once the replay is complete.

runConsumer<M extends ManualConsumer<M>, G extends Consumer<G>>(manualConsumerFactory: ManualConsumerFactoryFn<M>, groupConsumerFactory: GroupConsumerFactoryFn<G>): Promise<G>source

Use a manual consumer to replay and ingest events from the message bus. Finds and applies the latest snapshot that is older than the offset committed by the group consumer (if one has been committed) then all events in between the point of the snapshot and the committed offset. Resolves with the group consumer once the replay is complete.