Event bus

Updated at:

This topic describes how to add an event bus as an event source for an event stream in the EventBridge console.

Prerequisites

You have activated EventBridge and granted the required permissions.

Procedure

  1. Log on to the EventBridge console. In the left-side navigation pane, click Event Streams.

  2. In the top navigation bar, select a region and click Create Event Stream.

  3. In the Create Event Stream panel, set the Task Name and Description, configure the following sections, and click Save.

    • Create task

      1. In the Source configuration wizard, set Data Provider to EventBridge, configure the following parameters, and click Next.

        Parameter

        Description

        Example

        Region

        Select the target region.

        China (Hangzhou)

        Name

        Select the target event bus.

        default

        Subscription Rule

        Choose one of the following options:

        • Quickly Create: Recommended. Automatically creates a subscription rule named EVENTSTREAMING_xxxx .

        • Use Existing API Destination: Select an existing subscription rule.

        Quick Create

        Messages

        The maximum number of events to deliver in a batch. A batch is sent when it reaches this size. Valid values: 1 to 10,000.

        100

        Interval (Unit: Seconds)

        The maximum interval, in seconds, to wait before sending a batch. A batch is sent when this interval is reached, even if the batch size is not met. Valid values: 0 to 15. A value of 0 means events are delivered immediately.

        3

      2. In the Filtering, Transformation, and Sink configuration wizards, configure the event filtering and transformation rules and the event sink.

    • Task properties

      Configure the retry policy and dead-letter queue for the event stream.

Event example

{
    "id": "ae3gchfi-4b4d-927d-fbj9-516ib2******",
    "type": "ui:Created:PostObject",
    "dataschema": "http://taobao.com/item.json",
    "subject": "my:subject",
    "data": {
      "name": "Eventbridge",
      "number": 100
    }
  }

See Event overview for descriptions of the parameters defined in the CloudEvents specification.

The following table describes the parameters in the data field.

Parameter

Type

Example

Description

name

String

Eventbridge

An identifier for the event, used by your business logic. For example, this could be a module name or an event source label.

number

Number

100

A numeric value associated with the event, such as a counter, version number, or status code.