Skip to content

Commit

Permalink
Add an example to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanmei committed Jun 2, 2024
1 parent 45797ab commit 18e295e
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,28 @@ The IAM role will have a corresponding trust policy. For example:
]
}
```

## Running the connector

This example demonstrates using the sink connector to send a message to an SQS queue from Kafka.

- Setup an SQS queue
- Setup Kafka. Use the cluster defined in `docker-compose.yaml` if you don't have one
- Customize the files in the config directory; for example, `config/sink-connector.properties.example`

Now, start the sink connector in standalone mode:

```sh
$KAFKA_HOME/bin/connect-standalone.sh \
config/connect-worker.properties config/sink-connector.properties
```

Use a tool to produce messages to the Kafka topic.

```sh
bin/kafka-console-producer --bootstrap-server localhost:9092 \
--topic hello-sqs-sink \
--property parse.headers=true \
--property 'headers.delimiter=\t'
>test:abc\t{"hello":"world"}
```

0 comments on commit 18e295e

Please sign in to comment.