Force collection name

In this example we do not care about the incoming topic name. We want to force all topics to a specific collection. This is accomplished by using the RegexRouter transformation that is bundled with Apache Kafka.

Configuration
{
  "connector.class" : "com.github.jcustenborder.kafka.connect.solr.CloudSolrSinkConnector",
  "topic" : "<required setting>",
  "solr.zookeeper.hosts" : "zookeeper.example.com:2181",
  "solr.username" : "freddy",
  "solr.password" : "password12345",
  "transforms" : "dropPrefix",
  "transforms.dropPrefix.type" : "org.apache.kafka.connect.transforms.RegexRouter",
  "transforms.dropPrefix.regex" : ".*",
  "transforms.dropPrefix.replacement" : "forced-collection"
}