Creates a consumer that updates an async projection.
start() creates the missing tables of the projection (unless migrate is false; then run
migrate(pool, { eventStore: true, projections }) yourself). Every event updates the documents and the checkpoint
of its stream in one transaction, and the checkpoint moves only forward, so a redelivery, also by another instance,
does not apply an event twice. A failing evolve changes nothing and is retried later; the rest of its stream waits.
To rebuild the projection, stop every instance of its consumer, empty its table and remove its checkpoints in one
transaction, and start the consumer again: a running instance would apply events between the two steps again.
Creates a consumer that updates an async projection.
start()creates the missing tables of the projection (unlessmigrateisfalse; then runmigrate(pool, { eventStore: true, projections })yourself). Every event updates the documents and the checkpoint of its stream in one transaction, and the checkpoint moves only forward, so a redelivery, also by another instance, does not apply an event twice. A failingevolvechanges nothing and is retried later; the rest of its stream waits.To rebuild the projection, stop every instance of its consumer, empty its table and remove its checkpoints in one transaction, and start the consumer again: a running instance would apply events between the two steps again.