kafka-connect-transform-archive

Kafka Connect transformation used to help with archiving data to s3. This transformation copies the timestamp, topic, key, and value to a struct in the value of the record.

License

License

Categories

Categories

ORM Data
GroupId

GroupId

com.github.jcustenborder.kafka.connect
ArtifactId

ArtifactId

kafka-connect-transform-archive
Last Version

Last Version

0.1.0.3
Release Date

Release Date

Type

Type

tar.gz
Description

Description

kafka-connect-transform-archive
Kafka Connect transformation used to help with archiving data to s3. This transformation copies the timestamp, topic, key, and value to a struct in the value of the record.
Project URL

Project URL

https://github.com/jcustenborder/kafka-connect-transform-archive
Source Code Management

Source Code Management

https://github.com/jcustenborder/kafka-connect-transform-archive

Download kafka-connect-transform-archive

Dependencies

compile (4)

Group / Artifact Type Version
com.github.jcustenborder : cef-parser jar [0.0.1.7,0.0.1.2000)
com.fasterxml.jackson.core : jackson-databind jar 2.8.5
com.google.guava : guava jar 18.0
com.github.jcustenborder.kafka.connect : connect-utils jar [0.3.33,0.3.1000)

provided (1)

Group / Artifact Type Version
org.apache.kafka : connect-api jar 1.0.0

test (7)

Group / Artifact Type Version
org.reflections : reflections jar 0.9.10
com.github.jcustenborder.kafka.connect : connect-utils-testing-data jar [0.2.33,0.2.1000)
com.github.jcustenborder.kafka.connect : connect-utils-testing jar [0.3.33,0.3.1000)
org.junit.jupiter : junit-jupiter-engine jar 5.0.0
org.junit.jupiter : junit-jupiter-api jar 5.0.0
org.mockito : mockito-core jar 2.6.3
ch.qos.logback : logback-classic jar 1.1.8

Project Modules

There are no modules declared in this project.

Introduction

Transformations

Archive

The Archive transformation is used to help preserve all of the data for a message when archived to S3.

Note

This transform works by copying the key, value, topic, and timestamp to new record where this is all contained in the value of the message. This will allow connectors like Confluent's S3 connector to properly archive the record.

Configuration

Examples

Standalone Example

This configuration is used typically along with standalone mode.

name=Connector1
connector.class=org.apache.kafka.some.SourceConnector
tasks.max=1
transforms=tran
transforms.tran.type=com.github.jcustenborder.kafka.connect.archive.Archive
Distributed Example

This configuration is used typically along with distributed mode. Write the following json to connector.json, configure all of the required values, and use the command below to post the configuration to one the distributed connect worker(s).

{
  "name" : "Connector1",
  "connector.class" : "org.apache.kafka.some.SourceConnector",
  "transforms" : "tran",
  "transforms.tran.type" : "com.github.jcustenborder.kafka.connect.archive.Archive"
}

Use curl to post the configuration to one of the Kafka Connect Workers. Change http://localhost:8083/ the the endpoint of one of your Kafka Connect worker(s).

Create a new instance.

curl -s -X POST -H 'Content-Type: application/json' --data @connector.json http://localhost:8083/connectors

Update an existing instance.

curl -s -X PUT -H 'Content-Type: application/json' --data @connector.json http://localhost:8083/connectors/TestSinkConnector1/config

Versions

Version
0.1.0.3
0.1.0.2
0.1.0.1