1. Home
  2. Documentation
  3. Events Hub
  4. Subscribers

Subscribers

Learn what subscribers are and how to create them.

Subscribers are the applications or partners that receive events distributed by the Events Hub.

To receive events, subscribers must be connected to topics, which are grouped within handlers. Each topic can have different contexts available for the subscriber. Thus, when events are sent to a topic with a defined context, only the subscribers of that topic with the enabled context will receive the events.

The Events Hub ensures security, providing subscribers with a reliable source of messages.

TIP

The Subscribers screen lists all registered subscribers and allows you to create new ones:

Subscribers screen

Filters


You can search for a specific subscriber using the filters at the top of the page. They allow you to search by:

  • Subscriber name.

  • Developer's email.

  • Handler name.

  • Creation start and end dates.

  • Status.


Use the Order by field to define the list order. You can choose to view by the most recent or oldest creation date, or alphabetically.

To view the details of a specific subscriber, click on the name in the list. You will be directed to the Topics screen, where you can edit the subscriber's information and enable or disable the topics they receive events from.

Subscriber topics editing

Creating subscribers

To create a subscriber, click the + button in the bottom-right corner of the screen. The registration process consists of four steps:

Registration steps

Overview

To start the registration, fill in the fields:

  • Name: the subscriber's name, which must be unique.

  • Status: state, which can be approved, pending, rejected, or cancelled.

  • Description: optional field to include a description.

  • Developer: email of the developer responsible for the subscriber.

Security

In this step, you ensure the security of the connection between subscribers and the Events Hub.

TIP

Access the Security and Keys documentation to understand how it works.

Below are the two layers of security implemented:

  • Digital signature
  • Static or dynamic token

Digital signature

When distributing events to subscribers, we include a digital signature that allows the subscriber to validate the request's origin.

To generate this signature, you need to validate a shared key between the Events Hub and the subscriber.

Follow these steps:

Register a key in the Key field.

  • If the validation time expires, click the Refresh icon icon to restart the timer.

To validate the key, click VALIDATE KEY. If successful, you will see the message Post key URL validated Validation success on the Security screen.

IMPORTANT

If you register a subscriber without validating the shared key, it will not be possible to link it to any topic. A subscriber can only be linked to a topic after key validation.

Topics

In the TOPICS tab, you link the subscriber to the topics they will receive events from. Registered topics are displayed through the handlers.

  • You can search for specific handlers using the Keywords field, which searches for terms used in the handler's name or description. Additionally, you can reorder the list by name or creation date using the Order by field.

To link topics to your subscriber, follow these steps:

Select a handler and click the View topics icon icon in the View Topics column.

In the screen that opens, click the Expand icon icon and also enable the context for the subscriber.

In the Subscriber URL field, enter the URL that will receive the events.

In the Status Code field, specify the success status code that should be returned. This field only allows codes from 200 to 299. You can enter 2xx to cover the entire range.

The Events Hub will make a request to validate the URL, expecting the specified code.

WARNING

If the URL is not validated, the subscriber will be registered but will not receive events.

IMPORTANT

When sending events to the subscriber, the Events Hub will consider the code you defined as success in the Status Code field. If you specify code 204 and return 200, the system will interpret it as a delivery failure and send the event to the Delivery Retry queue. To avoid this, specify 2xx in the Status Code field. This way, any code in the 200 family will be interpreted as success.

Adding topics to subscriber

Each selected topic will be listed in the SUBSCRIBED TOPICS section. To remove the link, click the trash icon.

The STATUS column indicates whether the URL was successfully validated or not. The green icon represents success. The gray icon means the URL was registered but validation failed.

URL validation

Review

The final step of registering a subscriber displays the registered data:

Subscriber review

How happy are you with this page?

We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more