Handlers

Handlers work like topic aggregators. They help to create event publishing channels in a more organized and faster way. Security policies and automatic submission attempts are also defined by handler.

To understand how handlers work, it’s important to know how Events Hub enables the event publishing URL:

To publish events, you need to create a path (URL) that serves as a channel for sending events from a publisher to the Events Hub.

This URL is made up of URL base + context + handler + topic:

  1. Base URL: is defined by the Events Hub. It includes the interface address of each client + event-receiver + a unique code (hash).

  2. Context, handler and topic: these are created by you. They help you organize and manage different publishing channels.

    • Topic is the most specific level.

    • Handlers are the aggregators of topics, serving as a logical grouping layer.

    • Contexts add another level of grouping, allowing you to use the same topic in different situations.

List of handlers

On the Handlers screen, you can see all existing handlers. There, you can choose to organize them into cards by clicking on the icon view card icon or into tables by clicking on the icon view table icon.

handler screen

Filters

By default, handlers are listed in order of creation. In the Order by field, you select the order you want between:

  • Creation (desc): default. Lists handlers from the most recent creation date to the oldest.

  • Creation (asc): Lists handlers from the oldest creation date to the latest.

  • Name (desc): Lists handlers in alphabetical order, from Z to A.

  • Name (asc): Lists handlers in alphabetical order, from A to Z.

In the Keywords field, you can search for terms used in the name or description of the handlers.

Details

If you want to check the events sent to a handler’s topics, click on the icon event status icon. You will be directed to the page Event Status.

To view details of a handler, click on the card’s name. You will be directed to the Overview screen. There, you can view and edit the handler’s information in 4 tabs:

Topics

Shows the topics grouped in the handler, identified by name and description.

  • By clicking on the icon icon expand you will see the list of registered contexts.

    • To enable/disable, use the buttons in the Available column;

  • To edit a topic, click on the icon icon edit;

  • To delete a topic, click on the icon icon delete;

  • To register a new topic, click on the ADD TOPIC button and enter the name and description.

topic handler

Imagine that you want to create a flow for publishing various types of alert and test it without notifying subscribers. To do this, you can:

  1. create a handler called "Alerts", with the path /alerts;

  2. register topics grouped within the handler. For example: /latency for latency alerts and api-update for API update alerts;

  3. create a context for tests (e.g., testing) and enable it for the topic you want to test, so that subscribers don’t receive alerts.

    • To register subscribers in the testing context, you must link them to the topic and enable them only for the testing context.

    • If you don’t register any contexts, Events Hub sets the "Default" context, and no bookmarks are added to the publishing URL. Therefore, requests for the latency or api-update topics will be sent to <url-base>/alerts/latency/<url-base>/alerts/api-update and all active subscribers in it will receive the events.

The biggest advantage of using different contexts is that you can reuse the security policy and delivery retry settings defined in the handler, without creating new topics. And since authorization endpoints are defined by context, you can use an authorization mock for testing while keeping the default context’s authorization unchanged.

Policy

Shows the security policy and delivery attempts applied to the handler.

  • By clicking on the icon expand icon, you can see the automatic retry settings, request timeout, status codes that trigger retries, and the security interceptors enabled for the handler.

  • By clicking on the change policy icon, you can replace the applied policy.

    • The Change Policy screen allows you to select a new policy from the list or register it using the Create Policy button.

policy handler
Go to Policies documentation to understand how they work.

Publishers

Lists the publishers registered to send events to handler’s topics.

  • To find a specific publisher, use the search by name field.

  • By clicking on the icon expand icon, you can see for which topics and contexts the publisher is enabled.

    • The Path column describes the URL formed by <context>/<handler>/<topic>.

  • Clicking on the publisher’s name will redirect yo to the Publishers screen, where you can edit it.

publisher handler

Subscribers

Lists the subscribers registered to receive events from the handler’s topics.

  • To find a specific subscriber, use the search by name field.

  • By clicking on the icon expand icon, you can see for which topics and contexts the subscriber is enabled to receive events.

    • The Path column describes the URL formed by <context>/<handler>/<topic>.

    • In the Subscriber URL column is the URL where the events will be published.

  • Clicking on the subscriber’s name will take you to the Subscribers screen, where you can edit it.

subscriber handler

At the top of the tabs, you can:

  • edit the handler using the EDIT HANDLER button;

  • click on the icon icon magnifier to view the events sent to the handler’s topics on the Event Status screen;

  • delete the handler by clicking on the icon icon delete.

See more about handlers

Thanks for your feedback!
EDIT

Share your suggestions with us!
Click here and then [+ Submit idea]