Create AMQP action

Set up your AMQP broker, then create the AMQP action in the Admin Portal to send PubNub data to Advanced Message Queuing Protocol (AMQP).

Events & Actions is hosting‑agnostic. Any correctly configured AMQP broker works when you set up the action in the Admin Portal.

Existing AMQP environment

You need:

  • AMQP URL with TLS, credentials, and vhost.
  • Routing key to route messages to the correct queue.
  • (Optional) RabbitMQ exchange name for publishing messages.

When ready, go to Configure Admin Portal.

New AMQP environment

Set up a broker, then configure clients to connect.

Use services such as RabbitMQ or CloudAMQP to set up your AMQP broker.

Use the RabbitMQ docs to set up the broker, enable TLS, and get credentials, including the vhost.

Have this information ready to create an AMQP action:

  • AMQP URL with TLS, credentials, and vhost.
  • Routing key to route messages to the correct queue.
  • (Optional) RabbitMQ exchange name for publishing messages.

When your AMQP environment is ready and you have this information, follow Configure Admin Portal.

Configure Admin Portal

  1. In the Events & Actions view on the Admin Portal, click + Add Action.
  2. Select Advanced Message Queuing Protocol (AMQP) as the action type.
  3. In the URL field, enter the AMQP connection string in this format: amqps://username:password@hostname/vhost. Example: amqps://user123:pass456@bunny.cloudamqp.com/myvhost.
  4. In Routing key, enter the routing key the exchange uses to route messages. Example: logs.warning.
  5. (Optional) Enable Persistent to write each message to broker disk.
  6. (Optional) Enable and configure retries in AMQP retry.
  7. (Optional) Provide an Exchange name to identify the exchange within RabbitMQ where messages will be published. Example: MyExchange.
  8. (Optional) Set TTL (min) to override the default queue settings.
  9. Pair the action with an event listener in Actions. Click Add event listener and select an existing listener or create one. Link it to a listener that captures the events you want.
  10. Click Save changes.
Last updated on