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
|
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 or into tables by clicking on the icon.
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. 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 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 ;
-
To delete a topic, click on the icon ;
-
To register a new topic, click on the ADD TOPIC button and enter the name and description.
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:
|
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, 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 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.
-
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, 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.
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, 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.
At the top of the tabs, you can:
|
See more about handlers
-
Security policies and delivery attempts applied by the handler.
-
Using handlers to filter the list of events received and distributed by the Events Hub on the Event Status screen.
Share your suggestions with us!
Click here and then [+ Submit idea]