I am currently working with confluent 3.0.1 platform. I am trying to create 2 connectors on two different workers but trying to create a new connector is creating a new group for it.
Two connectors were created using below details:
1) POST http://devmetric.com:8083/connectors
{
"name": "connector1",
"config": {
"connector.class": "com.xxx.kafka.connect.sink.DeliverySinkConnector",
"tasks.max": "1",
"topics": "dev.ps_primary_delivery",
"elasticsearch.cluster.name": "ad_metrics_store",
"elasticsearch.hosts": "devkafka1.com:9300",
"elasticsearch.bulk.size": "100",
"tenants": "tenant1"
}
}
2) POST http://devkafka01.com:8083/connectors
{
"name": "connector2",
"config": {
"connector.class": "com.xxx.kafka.connect.sink.DeliverySinkConnector",
"tasks.max": "1",
"topics": "dev.ps_primary_delivery",
"elasticsearch.cluster.name": "ad_metrics_store",
"elasticsearch.hosts": "devkafka.com:9300",
"elasticsearch.bulk.size": "100",
"tenants": "tenant1"
}
}
But both of them were created under different group id. After this i queried on the existing groups.
$ sh ./bin/kafka-consumer-groups --bootstrap-server devmetric.com:9091 --new-consumer --list
Result was:
connect-connector2
connect-connector1
These groups was created by Kafka connect automatically and was not given by me. I had given different group.id in worker.properties. But I wanted both connectors to be under same group so that they work parallel to share the messages.As of now I have 1 million data on a topic "dev.ps_primary_delivery" and I want both connector to get 0.5 million each.
Please let me know how to do this.