Class AmqpSinkConfig

java.lang.Object
org.apache.kafka.common.config.AbstractConfig
io.aiven.commons.kafka.config.CommonConfig
io.aiven.commons.kafka.connector.common.config.ConnectorCommonConfig
io.aiven.kafka.connect.amqp.sink.config.AmqpSinkConfig
All Implemented Interfaces:
AmqpCommonConfig

public class AmqpSinkConfig extends io.aiven.commons.kafka.connector.common.config.ConnectorCommonConfig implements AmqpCommonConfig
The AMQP Sink configuration.
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.aiven.commons.kafka.connector.common.config.ConnectorCommonConfig

    io.aiven.commons.kafka.connector.common.config.ConnectorCommonConfig.Documentation

    Nested classes/interfaces inherited from class io.aiven.commons.kafka.config.CommonConfig

    io.aiven.commons.kafka.config.CommonConfig.ChangeTrackingMap
  • Field Summary

    Fields inherited from class org.apache.kafka.common.config.AbstractConfig

    AUTOMATIC_CONFIG_PROVIDERS_PROPERTY, CONFIG_PROVIDERS_CONFIG
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    fragmentPostProcess(io.aiven.commons.kafka.config.CommonConfig.ChangeTrackingMap parsedValues)
    Called directly after user configs got parsed (and thus default values got set).
    org.apache.qpid.protonj2.client.Client
    Creates a AMQP client.
    org.apache.qpid.protonj2.client.Connection
    getConnection(org.apache.qpid.protonj2.client.Client client)
    Creates a new Connection to an AMQP client.
    Gets the expected format for the AMQP message.
    org.apache.qpid.protonj2.client.Receiver
    getReceiver(org.apache.qpid.protonj2.client.Connection connection)
    Creates a new AMQP Receiver.
    org.apache.qpid.protonj2.client.Sender
    getSender(org.apache.qpid.protonj2.client.Connection connection)
    Creates a new AMQP Sender.
    Gets the write strategy for this sink.

    Methods inherited from class io.aiven.commons.kafka.connector.common.config.ConnectorCommonConfig

    getCompressionType, getKeyConverterSchemaRegistryUrl, getSchemaRegistryUrl, getValueConverterSchemaRegistryUrl, isKeyConverterRegistryEnabled, isSchemaRegistryEnabled, isValueConverterRegistryEnabled

    Methods inherited from class io.aiven.commons.kafka.config.CommonConfig

    finalize, getKafkaRetryBackoffMs, getKeyConverter, getMaxTasks, getTaskId, getValueConverter, postProcessParsedConfig

    Methods inherited from class org.apache.kafka.common.config.AbstractConfig

    documentationOf, equals, get, getBoolean, getClass, getConfiguredInstance, getConfiguredInstance, getConfiguredInstances, getConfiguredInstances, getConfiguredInstances, getDouble, getInt, getList, getLong, getPassword, getShort, getString, hashCode, ignore, logUnused, nonInternalValues, originals, originals, originalsStrings, originalsWithPrefix, originalsWithPrefix, typeOf, unused, values, valuesWithPrefixAllOrNothing, valuesWithPrefixOverride

    Methods inherited from class java.lang.Object

    clone, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.aiven.kafka.connect.amqp.common.config.AmqpCommonConfig

    getReceiver, getSender
  • Constructor Details

    • AmqpSinkConfig

      public AmqpSinkConfig(Map<String,String> originals)
      Constructor.
      Parameters:
      originals - the initial configuration data.
  • Method Details

    • fragmentPostProcess

      protected void fragmentPostProcess(io.aiven.commons.kafka.config.CommonConfig.ChangeTrackingMap parsedValues)
      Called directly after user configs got parsed (and thus default values got set). This allows to change default values for "secondary defaults" if required.
      Overrides:
      fragmentPostProcess in class io.aiven.commons.kafka.connector.common.config.ConnectorCommonConfig
      Parameters:
      parsedValues - unmodifiable map of current configuration
    • getReceiver

      public org.apache.qpid.protonj2.client.Receiver getReceiver(org.apache.qpid.protonj2.client.Connection connection) throws org.apache.qpid.protonj2.client.exceptions.ClientException, ExecutionException, InterruptedException
      Description copied from interface: AmqpCommonConfig
      Creates a new AMQP Receiver.
      Specified by:
      getReceiver in interface AmqpCommonConfig
      Parameters:
      connection - the AMQP connection to use for the receiver.
      Returns:
      the new AMQP Receiver. Must be closed when finished.
      Throws:
      org.apache.qpid.protonj2.client.exceptions.ClientException - if the AMQP receiver can not be created.
      ExecutionException - If the receiver could not be created.
      InterruptedException - If the remote server was interrupted.
    • getClient

      public org.apache.qpid.protonj2.client.Client getClient()
      Description copied from interface: AmqpCommonConfig
      Creates a AMQP client. Must be closed when finished.
      Specified by:
      getClient in interface AmqpCommonConfig
      Returns:
      a newly constructed client.
    • getConnection

      public org.apache.qpid.protonj2.client.Connection getConnection(org.apache.qpid.protonj2.client.Client client) throws org.apache.qpid.protonj2.client.exceptions.ClientException
      Description copied from interface: AmqpCommonConfig
      Creates a new Connection to an AMQP client.
      Specified by:
      getConnection in interface AmqpCommonConfig
      Parameters:
      client - the client to connect to.
      Returns:
      the Connection. Must be closed when finished.
      Throws:
      org.apache.qpid.protonj2.client.exceptions.ClientException - if the AMQP connection can not be established.
    • getSender

      public org.apache.qpid.protonj2.client.Sender getSender(org.apache.qpid.protonj2.client.Connection connection) throws org.apache.qpid.protonj2.client.exceptions.ClientException, ExecutionException, InterruptedException
      Description copied from interface: AmqpCommonConfig
      Creates a new AMQP Sender.
      Specified by:
      getSender in interface AmqpCommonConfig
      Parameters:
      connection - the AMQP connection to use for the sender.
      Returns:
      the new AMQP sender. Must be closed when finished.
      Throws:
      org.apache.qpid.protonj2.client.exceptions.ClientException - if the AMQP sender can not be created.
      ExecutionException - If the sender could not be created.
      InterruptedException - If the remote server was interrupted.
    • getMessageFormat

      public AmqpFormat getMessageFormat()
      Description copied from interface: AmqpCommonConfig
      Gets the expected format for the AMQP message. This is the conversion strategy AMQP and Kafka message formats.
      Specified by:
      getMessageFormat in interface AmqpCommonConfig
      Returns:
      the expected Amqp message format.
    • getWriteStrategy

      public AmqpStrategy getWriteStrategy()
      Gets the write strategy for this sink.
      Returns:
      the Write strategy for this sink.