Skip to content

How can consumers support bounded processing? #362

Description

@quincycs

Hi,

receive(..., max_return) returns at most max_return events, but ack(batch_id) acknowledges the entire tick batch.

How should a consumer safely process only X events per invocation without dropping unreturned events or replaying already-processed ones?

Does this require the consumer to persist partial-batch progress separately?

Thank youuuu

My best guess at an new API for this, (if we wanted PgQue to persist/handle this)

  select * from pgque.receive_chunk('orders', 'worker', 100);
  select pgque.ack_chunk(batch_id, chunk_id);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions