Enum Class KinesisSinkConfig.MessageFormat

java.lang.Object
java.lang.Enum<KinesisSinkConfig.MessageFormat>
org.apache.pulsar.io.kinesis.KinesisSinkConfig.MessageFormat
All Implemented Interfaces:
Serializable, Comparable<KinesisSinkConfig.MessageFormat>, Constable
Enclosing class:
KinesisSinkConfig

public static enum KinesisSinkConfig.MessageFormat extends Enum<KinesisSinkConfig.MessageFormat>
  • Enum Constant Details

    • ONLY_RAW_PAYLOAD

      public static final KinesisSinkConfig.MessageFormat ONLY_RAW_PAYLOAD
      Kinesis sink directly publishes pulsar-payload as a message into the kinesis-stream.
    • FULL_MESSAGE_IN_JSON

      public static final KinesisSinkConfig.MessageFormat FULL_MESSAGE_IN_JSON
      Kinesis sink creates a json payload with message-payload, properties and encryptionCtx and publishes json payload to kinesis stream. schema: {"type":"object","properties":{"encryptionCtx":{"type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"string"}},"uncompressedMessageSize":{"type":"integer"},"keysMetadataMap":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}},"keysMapBase64":{"type":"object","additionalProperties":{"type":"string"}},"encParamBase64":{"type":"string"},"compressionType":{"type":"string","enum":["NONE","LZ4","ZLIB"]},"batchSize":{"type":"integer"},"algorithm":{"type":"string"}}},"payloadBase64":{"type":"string"},"properties":{"type":"object","additionalProperties":{"type":"string"}}}} Example: {"payloadBase64":"cGF5bG9hZA==","properties":{"prop1":"value"},"encryptionCtx":{"keysMapBase64":{"key1":"dGVzdDE=","key2":"dGVzdDI="},"keysMetadataMap":{"key1":{"ckms":"cmks-1","version":"v1"},"key2":{"ckms":"cmks-2","version":"v2"}},"metadata":{"ckms":"cmks-1","version":"v1"},"encParamBase64":"cGFyYW0=","algorithm":"algo","compressionType":"LZ4","uncompressedMessageSize":10,"batchSize":10}}
    • FULL_MESSAGE_IN_FB

      public static final KinesisSinkConfig.MessageFormat FULL_MESSAGE_IN_FB
      Kinesis sink sends message serialized in flat-buffer.
    • FULL_MESSAGE_IN_JSON_EXPAND_VALUE

      public static final KinesisSinkConfig.MessageFormat FULL_MESSAGE_IN_JSON_EXPAND_VALUE
      Kinesis sink sends a JSON structure containing the record topic name, key, payload, properties and event time. The record schema is used to convert the value to JSON. Example for primitive schema: {"topicName":"my-topic","key":"message-key","payload":"message-value","properties":{"prop-key":"prop-value"},"eventTime":1648502845803} Example for AVRO or JSON schema: {"topicName":"my-topic","key":"message-key","payload":{"c":"1","d":1,"e":{"a":"a"}},"properties":{"prop-key":"prop-value"},"eventTime":1648502845803} Example for KeyValue schema: {"topicName":"my-topic","key":"message-key","payload":{"value":{"c":"1","d":1,"e":{"a":"a"}},"key":{"a":"1","b":1}},"properties":{"prop-key":"prop-value"},"eventTime":1648502845803}
  • Method Details

    • values

      public static KinesisSinkConfig.MessageFormat[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static KinesisSinkConfig.MessageFormat valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null