Important
You are viewing documentation for an older version of Confluent Platform. For the latest, click here.
Example configurations¶
These following sections requires running ZooKeeper, Apache Kafka®, and Connect. For more information, see the Kafka Connect quick start guide.
Standalone¶
The first configuration is used typically along with :standalone mode.
name=connector1
tasks.max=1
connector.class=io.confluent.connect.ibm.mq.IbmMQSourceConnector
# The following values must be configured and should match your environment.
kafka.topic=MyKafkaTopicName
mq.hostname=localhost
mq.transport.type=client
mq.queue.manager=QMA
mq.channel=SYSTEM.DEF.SVRCONN
jms.destination.name=testing
# The following define the information used to validate the license stored in Kafka
# or leave blank for a 30 day trial
confluent.license=
confluent.topic.bootstrap.servers=localhost:9092
Change the confluent.topic.*
properties as required to suit your environment.
If running on a single-node Kafka cluster you will need to include confluent.topic.replication.factor=1
.
Leave the confluent.license
property blank for a 30 day trial.
See the configuration options for more details.
Distributed¶
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",
"config": {
"connector.class": "io.confluent.connect.ibm.mq.IbmMQSourceConnector",
"kafka.topic":"MyKafkaTopicName",
"mq.hostname":"localhost",
"mq.transport.type":"client",
"mq.queue.manager":"QMA",
"mq.channel":"SYSTEM.DEF.SVRCONN",
"jms.destination.name":"testing",
"confluent.license":"",
"confluent.topic.bootstrap.servers":"localhost:9092"
}
}
Change the confluent.topic.*
properties as required to suit your environment.
If running on a single-node Kafka cluster you will need to include "confluent.topic.replication.factor":"1"
.
Leave the confluent.license
property blank for a 30 day trial.
See the configuration options for more details.
Use curl to post the configuration to one of the Kafka Connect Workers.
Change http://localhost:8083/
the endpoint of one of your Kafka Connect worker(s).
curl -s -X POST -H 'Content-Type: application/json' --data @connector.json http://localhost:8083/connectors