Topic Configuration

This topic explains the configuration for mapping Jade events to topics in Kafka or Hubs in Azure Event Hubs.

Configuration Structure

{
  "TopicName1": [ ... ],
  "TopicName2": [ ... ],
...
}

Each topic or hub is represented by an array of mapping rules.

Mapping Rules

The mapping rules are as follows.

Class-Based Mapping

The class-based mapping rule sends all events for the specified class to the topic.

{
  "Class": "SchemaName::ClassName"
}

The class-based mapping values are listed in the following table.

Value Name of the...
SchemaName

Schema in Jade

ClassName Class in Jade

Event-Based Mapping

The event‑based mapping rule sends all events of the specified type to the topic, regardless of the class.

{
  "*": "EventName"
}

The wildcard "*" value indicates all classes.

The "EventName" value specifies the name of the event type. Only "TransactionCommitted" is supported at this time.

Special Wildcard Mapping

The special wildcard mapping rule sends events for all classes to the topic.

{
  "Class": "*"
}

This rule sends events for all classes to the topic.

Example Configuration

The following is an example of topic configuration.

{
    "OrgEvents": [
        { "Class": "BankModelSchema::Bank" },
        { "Class": "BankModelSchema::District" }
    ],
    "AccountEvents": [
        { "Class": "BankModelSchema::Account" }
    ],
    "CustomerEvents": [
        { "Class": "BankModelSchema::Customer" }
    ],
    "TransactionEvents": [
        { "Class": "BankModelSchema::Transaction" }
    ],
    "TransactionCommitEvents": [
        { "*": "TransactionCommitted" }
    ],
    "JadeAllEvents": [
        { "Class": "*" },
        { "*": "TransactionCommitted" }
    ]
}

Configuration Breakdown

The topic configuration elements are listed in the following table.

Event Receives...
OrgEvents Events for BankModelSchema::Bank and BankModelSchema::District classes.
AccountEvents Events for the BankModelSchema::Account class.
CustomerEvents Events for the BankModelSchema::Customer class.

TransactionEvents

Events for the BankModelSchema::Transaction class.
TransactionCommitEvents All TransactionCommitted events, regardless of the class.
JadeAllEvents

Events for all classes and all TransactionCommitted events.

This topic will receive a copy of all events sent to other topics.

Best Practices

Topic configuration best practices are as follows.