Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ensync.cloud/llms.txt

Use this file to discover all available pages before exploring further.

Usage

subscription.on(async (event) => {
  try {
    await processPayment(event.payload);
    await subscription.ack(event.idem, event.block);
  } catch (error) {
    // Defer for 5 seconds
    await subscription.defer(event.idem, 5000, "Temporary error");
  }
});

Parameters

ParameterTypeRequiredDescription
idemstringYesUnique event ID
delayMsnumberYesDelay in milliseconds
reasonstringNoOptional reason for deferring
Deferred events return to the queue after the delay. Any of your client instances sharing the same appKey can receive them.