How to create and manage Topics and Events subscriptions
This page shows how to create and manage subscriptions with Scaleway Topics and Events (formerly part of the Messaging and Queuing product). When you create a subscription to a topic, you are effectively signing up an endpoint to receive all messages published to that topic.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- An existing topic
How to create a subscription
-
Click Topics and Events in the Serverless section of the Scaleway console side menu.
-
Use the dropdown menu to select the region of the topic you want to create a subscription for.
-
Click the name of the topic you want to create a subscription for.
-
Click Create Subscription. The subscription creation wizard displays.
-
Verify the parameters of the topic that you are creating a subscription for (name, and type).
-
Choose a protocol, based on the type of endpoint or client you want to subscribe. Click the tab below for further details and full instructions on each protocol:
Select HTTP to create a subscription for a service or web server that can receive
HTTP POST
requests from Topics and Events, via standard HTTP protocol.Note that for security reasons, we recommend using the HTTPS protocol, rather than HTTP.
You are prompted to enter the URL of the HTTP endpoint to subscribe, e.g.
example.com
. Note that the scheme (http://
) is not required.After your HTTP subscription is created, you must confirm it. Find out how in our dedicated documentation.
Select HTTPS to create a subscription for a service or web server that can receive
HTTP POST
requests from Topics and Events, via secure HTTP protocol.You are prompted to enter the URL of the HTTP endpoint to subscribe, e.g.
example.com
. Note that the scheme (https://
) is not required.After your HTTP subscription is created, you must confirm it. Find out how in our dedicated documentation.
Choose Serverless Functions and Containers to create a subscription for a Scaleway Serverless Function or Container that you have created.
You are prompted to select the namespace containing the Function or Container that you want to subscribe. Only namespaces in the same Project and region as the topic can be selected.
You are prompted to select the Serverless Function or Container to subscribe. Only Functions and Containers with a public privacy policy can subscribe to an topic.
-
Click Create subscription to finish.
The subscription is created. If you created an HTTP or HTTPS subscription, you will now need to confirm it, as described below. This step is not required for Serverless Functions / Containers or Queues subscriptions.
How to confirm an HTTP or HTTPS subscription
An HTTP or HTTPS subscription will have a Pending
status until you confirm it. This is essential for it to be able to start receiving messages. Follow the steps below to confirm the subscription:
-
Access the subscriptions listing page (from the console side menu, Serverless > Topics and Events > Topics, click the topic containing the subscription).
-
Click the «See more Icon» icon next to the subscription you wish to confirm, then select Confirm subscription from the menu. A pop-up displays:
-
Retrieve the confirmation message that Scaleway Topics and Events sent to your endpoint (delivered as an
HTTP POST
request), and extract theSubscribeURL
from the message payload. -
Enter the
SubscribeURL
value (e.g.https://sns.mnq.{region}.scaleway.com/?Action=ConfirmSubscription&TopicArn={your-topic-arn}&Token={your-subscription-token}
) in the box. The correct values for region, topic ARN and subscription token should be pre-filled for you in the URL. -
Click Confirm subscription.
The subscription’s status is now shown as Confirmed. The subscription will now receive messages published to the topic.
How to delete a subscription
When you no longer want a subscribed endpoint or service to receive messages from the topic, you can delete the subscription.
-
Click Topics and Events in the Serverless section of the Scaleway console side menu.
-
Use the drop-down menu to select the region containing the subscription you want to delete.
-
Click the topic containing the subscription you want to delete.
-
Click the Subscriptions tab. The list of subscriptions to this topic displays.
-
Either:
- Click the subscription you wish to delete. The subscription’s Settings page displays. Click the Delete subscription button in the bottom right corner.
- Click the «See more Icon» icon next to the subscription you wish to delete, then select Delete from the menu that displays.
A pop-up asks you to confirm that you understand this action will delete the subscription.
-
Type DELETE and click Delete subscription.