Introduction to the Event Hub Service

Last updated a month ago

Getting started with the Event Hub Service.

Welcome to the CoreMedia Event Hub Service documentation. In this introduction, you will get a basic overview of the Event Hub and how to use it.

Overview of the Architecture

The CoreMedia Event Hub Service is a cloud-only service, which enables you to subscribe to the events of CoreMedia Content Cloud. An event is created whenever a content item has been changed, created, or deleted on either the Content Management Server or the Master Live Server. Additionally, certain user actions in CoreMedia Studio and changes in workflows can trigger events.

Architecture of Event Hub Servce

Events happening on a CoreMedia Content Cloud instance are sent to the Event Hub Service. The service receives the events, processes, and distributes them to the registered webhooks.

Events

You can use the Event Hub Service to consume three kinds of events:

  • Content Events

    Events from the content repository, analogous to the content events in the CoreMedia Unified API. Examples are:

    • content creation

    • content update

    • check-in/out

    • approval

    • publication/depublication

    • deletion

  • Workflow Events

    Workflow relevant events like

    • Workflow assignments

    • Workflow status changes

  • Notification Events

    All events that are also available as Studio notifications are available as editorial events in the Event Hub. This includes:

    • Editorial Comments in Studio

    • Other notifications like project assignments.

Webhooks

Webhooks are simple URL endpoints. The Event Hub Service sends the event payload in JSON format in the request body to registered webhook endpoints. The API of events is documented in https://documentation.coremedia.com/eventhub-api/

The webhook endpoint must respond with one of the following status codes:

  • OK (200)

  • ACCEPTED (202)

  • NO_CONTENT (204)

The endpoint should respond as fast as possible to avoid timeouts on the sender side which would lead to repeated retransmissions of the same message. It’s recommended to handle the incoming messages asynchronously. That is, persisting them to a durable storage and returning the webhook call and using asynchronous workers to do the real processing on the persisted messages.

The content events are delivered in batches of up to 100 items.

There will be some delay between the change on the Content Server and the arrival at the webhook endpoint. The delay depends on the system load and can be up to 1 minute.

Error Cases

The events are delivered sequential in the FIFO (first in, first out) manner. That has an implication when the webhook endpoint responds to a message with something else than the 2xx status codes listed above: The message will be repeatedly sent until the endpoint responds with a 2xx. Until then, no later messages will be sent to the webhook endpoint. This retry is limited by an internal timeout of 7 days. After reaching the timeout, the unsuccessfully responded message will be removed from the system.

Configuration of the Webhook Subscription

You can use the Event Hub Webhook Subscription Service to administer the webhook endpoints for your CMOC instances by yourself. See Using the Event Hub Webhook Subscription Service

Activation of the Event Hub Service

Contact the CoreMedia support at support@coremediaoncloud.com to get the Event Hub Service activated for your account.

The CoreMedia support will provide you with the URL of the subscription service and will provide secrets in the Cloud Manager of your instance. Use the secrets to get the token, necessary to access the subscription service.

Copyright © 2024 CoreMedia GmbH, CoreMedia Corporation. All Rights Reserved.