Interface Consumer<T>

Type Parameters:
T - the decoded body type

public interface Consumer<T>
Consumes messages from a Queue. An uncaught exception retries the whole batch; acknowledging or retrying individual messages is done through MessageBatch.

A message body travels through the structured clone algorithm and is capped at 128 KB.

Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    queue(MessageBatch<T> batch, Env env, ExecutionCtx ctx)
    Handles one batch.
  • Method Details

    • queue

      void queue(MessageBatch<T> batch, Env env, ExecutionCtx ctx)
      Handles one batch.
      Parameters:
      batch - the delivered messages
      env - the bindings declared in the Wrangler configuration
      ctx - the invocation context