Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-2032

Outbox Event Router SMT can move type to header only if renamed eventType

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Minor
    • None
    • 1.1.1.Final
    • outbox
    • None

    Description

      The Outbox Event Router SMT offers custom placement of the outbox pattern table fields based on `table.fields.additional.placement`.

      Because of the following test and logic in EventRouterConfigDefinition.java:

      if (EventRouter.ENVELOPE_EVENT_TYPE.equals(addField.getAlias())) {
        eventTypeMappingProvided = true;
      }
      // ....
      if (!eventTypeMappingProvided) {
      	additionalFields.add(0, new AdditionalField(AdditionalFieldPlacement.ENVELOPE, eventTypeColumn, EventRouter.ENVELOPE_EVENT_TYPE));
      }
      

      I believe the header placement of field `type` is only possible if and only if it's renamed `eventType` (except if duplicating the configuration as such `"type:header:eventType,type:header"` which in turn set two headers instead of one).

      I am not sure of the reason of this logic at all but it prevents people from having `type` as header with its original name (without duplicating the field).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ebrard Emmanuel Brard
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: