kafka-connect-twitter
kafka-connect-twitter copied to clipboard
Error while creating source connector
Hi,
I am trying to create a source connector using the below-listed command and configurations.
curl -X POST
http://localhost:8091/connectors
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-d '{
"name": "kafka-connect-twitter",
"config": {
"connector.class": "com.eneco.trading.kafka.connect.twitter.TwitterSourceConnector",
"tasks.max": "1",
"topic": "fooTweets",
"twitter.consumerkey": "xxxxxxxxxxxxxx",
"twitter.consumersecret": "xxxxxxxxxxxx",
"twitter.token": "xxxxxxxxxxx",
"twitter.secret": "xxxxxxxxxxx",
"track.terms": "fooTerm"
}
}'
However, I am getting an error: {"error_code":500,"message":"Must configure one of topics or topics.regex"}
For some reason, I am unable to specify the topic name in the 'topic' field.
To make things more difficult for myself, I specified the topic name in 'topics' field and was left scratching my head why the topic being used was called 'tweets', realized now that it's the default value of topic name in the code.
Any help/advise would be appreciated.
Thanks
I think in the new Kafka versions the key "topic" is no longer accepted use either "topics": "fooTweets", or "topics.regex":"fooTweets"
@jsing120
There is still a problem. The topic has the name tweets, no matter what I add to the .properties file.
@ThadeuFerreira
It seems you have to add both to make it work :
"topic": "fooTweets", "topics": "fooTweets",
Dunno but this connector seems to be little bit outdated no ?