jcustenborder / kafka-connect-solr

Kafka Connect connector for writing to Solr.
Apache License 2.0
44 stars 28 forks source link

Use topic name to compute the collection to send the updates in "Standard Solr" #53

Open didiez opened 1 year ago

didiez commented 1 year ago

In "Standard Solr" mode, there is no way to route messages dynamically to multiple collections using RegexRouter as noted in the docs.

HttpSolrSinkTask should use topic to send the documents to a solr collection with that very same name. Either appending the collection to the base solrUrl in ... https://github.com/jcustenborder/kafka-connect-solr/blob/c917b5c8e938575b6880729f3dbbb7cac4062cb8/src/main/java/com/github/jcustenborder/kafka/connect/solr/HttpSolrSinkTask.java#L42 Or using the overloaded method process(SolrClient client, String collection) in https://github.com/jcustenborder/kafka-connect-solr/blob/c917b5c8e938575b6880729f3dbbb7cac4062cb8/src/main/java/com/github/jcustenborder/kafka/connect/solr/HttpSolrSinkTask.java#L56