Available actions

An event listener forwards a matching event to one or more actions. This reference lists every available action type and the mechanics that all of them share: retries, the envelope, and batching. Each how-to page linked below covers connecting and configuring that one action type. Your Events & Actions tier sets how many actions a single listener can trigger.

Action types​

ActionDescriptionHow to configure
WebhookSends the event as an HTTP request to an endpoint you control.Create a Webhook action
Amazon SQSSends the event to an Amazon SQS queue for medium to large data volumes.Create an SQS action
Amazon KinesisStreams the event to Amazon Kinesis for large to extra-large data volumes.Create a Kinesis action
Amazon S3Uploads the event to an Amazon S3 bucket for storage.Create an S3 action
Apache KafkaPublishes the event to an Apache Kafka topic.Create a Kafka action
IFTTT WebhookTriggers an IFTTT applet with the event.Create an IFTTT action
AMQPPublishes the event to an AMQP exchange, such as RabbitMQ.Create an AMQP action

Retries​

Every action type supports request retries. A retry uses a new random delay for each attempt.

Events & Actions retries use jittered backoff:

delay = random_between(minIntervalForRetry = 10sec, min(maxRetryPeriod = 900sec, (baseRetryIntervalDefinedByUser * 2) ^ attemptNo))
SettingDescriptionDefaultMinMax
Number of retriesNumber of attempts to retry the action214
Retry interval (seconds)Base delay used to calculate each retry's wait45010900

Events & Actions retries are available on paid tiers. The Free tier's single listener does not retry failed deliveries.

See Availability for the full tier breakdown.

A Webhook delivery succeeds after a 2XX response, follows a 301 for up to three redirects, and retries other statuses according to the action's retry policy.

For the payload shape and the legacy webhook migration path, see the legacy webhooks migration guide.

Envelope​

Every action can optionally wrap the event's data in an envelope, PubNub's own metadata about which listener and action produced the event. Turn on Is Enveloped in the action's configuration to add it.

  • Skip the envelope when your destination only needs the event's own data.
  • Use the envelope when your destination needs to know which listener or action triggered the event, alongside the event data itself.

Enveloped Events & Actions payloads use schema version 1.0, 2.0, or 2.1; 2.1 is the default when enveloping is enabled. Actions without an envelope use the no-envelope format.

See Events & Actions payloads for the full JSON of every version, for every event type.

Batching​

Amazon S3 and Webhook actions can batch, sending several events in a single request instead of one request per event. Batching reduces the number of requests your destination handles, at the cost of needing to unpack individual events from a batch file or payload on your end.

Set both batching bounds. Whichever bound is reached first sends the batch.

Events & Actions sends a batch when either configured bound is reached first:

SettingDescriptionDefaultMinMax
Item count boundMaximum number of events queued per batch100110000
Time bound (seconds)Maximum time events collect before the batch sends51300

An Events & Actions Amazon S3 batch larger than 5 MB uses an Amazon S3 multipart upload, which splits the batch into parts automatically.

For the Webhook action, whether you need batching, and what size to batch at, depends on your endpoint's own request size and throughput limits.

Next steps​

Was this page useful?

Last updated on