Multi-Connector

The multi-connector enables you to send event streams to two or more event consumers with one connector. For example, you can send an event stream to a Kafka connector and a console connector from a single multi-connector. Define at least two connectors inside each multi-connector.

You define combinations of the other Event Streaming Framework connectors inside a multi-connector. Those connectors use their default syntax. You cannot define a multi-connector inside another multi-connector.

Multi-Connector Properties lists the multi-connector properties.
Table 1. Multi-Connector Properties
Property Description
connector (Required) multi. This property identifies the connector as a multi-connector.
success
(Required) This property specifies one of the following modes:
  • any — The Event Streaming Framework tries to stream events to the connectors in the list in the order they are defined, one at a time, until the first stream is received. At the first successful event delivery, the multi-connector stops and reports success. The multi-connector does not try to send events to any other connectors in the array.
  • all — The Event Streaming Framework tries to stream events to all configured connectors. Processing continues until all connectors in the array have received the events. Delivery is considered successful if all the connectors received the events.
list (Required) This property introduces the list of connectors within the multi-connector. This property can contain any combination of connectors except another multi-connector.

Multi-Connector YAML Examples

The following multi-connector configuration in any mode tries to first stream events to a Kafka event streaming cluster. If the first connector fails, the multi-connector tries to stream the events to the events.mdc file. If the disk connector fails, the multi-connector writes the events to standard output.
connector: multi
success: any
list:
- connector: kafka-connector
  topic: allevents
  format: raw
  settings:
    bootstrap.servers: 10.10.96.51:29092
    acks: all
    retries: 0
    value.serializer: com.matrixx.kafka.eventStore.DataContainerSerdes
    key.serializer: org.apache.kafka.common.serialization.StringSerializer
- connector: disk
  filename: events.mdc
  format: raw
- connector: console
  format: raw
The following multi-connector configuration in all mode tries to write events to the standard output, to a Kafka event streaming cluster, and an events file:
connector: multi
success: all
list:
- connector: kafka
  topic: allevents
  format: raw
  settings:
    bootstrap.servers: 10.10.96.51:29092
    acks: all
    retries: 0
    value.serializer: com.matrixx.kafka.eventStore.DataContainerSerdes
    key.serializer: org.apache.kafka.common.serialization.StringSerializer
- connector: disk
  filename: events.mdc
  format: raw
- connector: console
  format: raw