Create your first Subscription
Create a Subscription for your newly created Topic.
A Subscription for a Topic in webhooks, is a request by a client (subscriber) to receive notifications for events related to a specific Topic. It involves registering a webhook URL to listen for and handle events filtered for that Subscription.
A Topic can have one or many Subscriptions, allowing multiple webhook URLs to listen out for specific events for the Topic.
To create a Subscription:
- Be sure to be inside the newly created Topic.
- Press the
Add Subscription
button. - Give the Subscription a unique name.
- Add a description for the Subscription.
- Choose the events that the Subscription wants to subscribe to. Remember that not all the events could be applicable to them so they can pick and choose, being prescriptive to what they want to subscribe to. Subscription can only choose events that are defined on the Topic which the Publisher controls.
- If applicable, you can choose to apply advanced filtering, aggregation and transformation to incoming events. Select the Plus (+) icon adjacent the Endpoint destination and the Advanced Query modal will appear. Add example JSON events within the Input area, add your SQL query for filtering, aggregation or transformation, then press the test filter button to ensure you're receiving the expected output. Once you're happy that it's all working, just press the
Save
button on the Advanced Query modal. See example use cases for Q-Flow Advanced Query using a SQL syntax. - Set a webhook endpoint URL.
- Configure the maximum retries for the webhook. This allows you to set the retries attempts following the Q-Flow Exponential back-off process.
- Press the
Create
button. - Once the Subscription has been created, you can view the Subscription Webhook Secret. For more information around Webhook Signatures, please refer to Q-Flow Webhook Signatures concept page.