Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect topology shows wrong topics #53

Closed
kanimaru opened this issue Dec 15, 2017 · 3 comments
Closed

Connect topology shows wrong topics #53

kanimaru opened this issue Dec 15, 2017 · 3 comments
Assignees

Comments

@kanimaru
Copy link

Using:

  • Kafka Connect Version : 0.11.0.0-cp1
  • Kafka Connect UI Version : 0.9.2
  • ElasticSearch (confluent) Worker

Configuration like this:

{
  "connector.class": "io.confluent.connect.elasticsearch.ElasticsearchSinkConnector",
  "type.name": "action",
  "flush.timeout.ms": "10000",
  "topics": "action-log",
  "tasks.max": "1",
  "batch.size": "1000",
  "topic.key.ignore": "true",
  "topic.index.map": "action-log:log",
  "name": "my_logger",
  "connection.url": "http://somedomain:9200",
  "linger.ms": "10",
  "topic.schema.ignore": "false"
}

Following Topics will be recognized:

  • action-log
  • true
  • action-log:log
  • false
@lensesio lensesio deleted a comment from stheppi Dec 28, 2017
@andmarios
Copy link
Contributor

andmarios commented Dec 28, 2017

Hey @kanimaru, the problem is that the topics field isn't standard in Kafka Connect, so we can't rely on it in order to detect the topics your connector uses.

Thus, trying to be smart, we will use any configuration option that includes topic in its name in order to detect topics. Alas in your case it backfires and Connect UI detects erroneous topic names.

I don't know whether there are any plans to fix this in the short term from the dev team.

@namoscato
Copy link
Contributor

@andmarios, that is true for source connectors, but per Kafka documentation, sink connectors will always have a topics option. Thus, I believe an explicit assumption could be made for sinks.

Here are the topic-related configuration option(s) for some common source connectors:

Connector Option
JdbcSourceConnector topic.prefix
ReplicatorSourceConnector topic.regex, topic.whitelist, topic.blacklist
FileStreamSource topic
SpoolDirCsvSourceConnector topic
FsSourceConnector topic
FtpSourceConnector ftp.monitor.tail, ftp.monitor.update
GitHubSourceConnector topic
CloudPubSubSourceConnector kafka.topic
IotHubSourceConnector Kafka.Topic
CouchbaseSourceConnector topic.name
ReplicateSourceConnector topic.prefix
KineticaSourceConnector kinetica.topic_prefix
HANASourceConnector topics

Clearly some of these are more complex than others (i.e. connectors with configuration options similar to ReplicatorSourceConnector), but thoughts on updating the source connector "topic extraction" algorithm to first try and find a single configuration option that matches the following regular expression?

/(?:kafka[._])?topics?(?:[._]prefix)?$/

It seems like that would fix most of the issues.

@andmarios
Copy link
Contributor

Thanks! This is very helpful indeed.

I tagged some members of the UIs dev team to have a look and implement it when possible.

namoscato pushed a commit to namoscato/kafka-connect-ui that referenced this issue Feb 3, 2018
namoscato pushed a commit to namoscato/kafka-connect-ui that referenced this issue Feb 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants