Updated on 2023-10-26 GMT+08:00

Routing to FunctionGraph

Configure FunctionGraph as the event target when creating an event stream.

Prerequisites

You have enabled FunctionGraph and created a function as the event target.

Procedure

  1. Log in to the EG console.
  2. In the navigation pane, choose Event Streams.
  3. Click Create Event Stream.
  4. Enter an event stream name and description, and click OK.
  5. Configure the event source by referring to Configuring DMS for Kafka as the Event Source.
  6. Configure the event target.

    1. Click Event Target.
    2. Select FunctionGraph (function computing) for Target.
    3. Set event target parameters.
      Figure 1 Event target - FunctionGraph
      Table 1 FunctionGraph (function computing) parameters

      Parameter

      Description

      Function

      Select the function to trigger. If no function is available, create one by referring to Creating a Function.

      Version/Alias

      Choose to specify a version or alias.

      Version

      Select a function version. Default: latest.

      Alias

      Select a function alias.

      Execute

      Default: Synchronously.

      Agency

      Select an agency. If no agency is available, click Create Agency to generate one named EG_INVOKE_FG_AGENCY.

      • Only agencies with EG as the delegated cloud service are displayed.
      • Select an agency with the permission functiongraph:function:invoke*.

      Rule

      Transform Type

      EG transforms CloudEvents-compliant events for targets. The following three types are supported:
      • Pass-through: Route the complete structure of native events directly to the target.
      • Variables: Route only parameters extracted from events with JSONPath to the target.
      • Constants: Route only constants in events to the target as a trigger.

      For more information about the transform types, see Event Content Transformation.

      Message Push

      Batch Push

      Specify whether to enable batch push to aggregate multiple events.

      Messages

      The maximum number of aggregated records that can be pushed at a time. Default: 100. Range: 1–10,000. This parameter is available only when Batch Push is enabled.

      Interval (s)

      The interval between batch pushes, in seconds. Default: 1. Range: 0–15. This parameter is available only when Batch Push is enabled.

  7. Click OK.
  8. After the event source and target are configured, click Save in the upper right.