kafka-connect-twitter icon indicating copy to clipboard operation
kafka-connect-twitter copied to clipboard

Error while creating source connector

Open rsjain1978 opened this issue 7 years ago • 3 comments

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

rsjain1978 avatar May 26 '18 20:05 rsjain1978

I think in the new Kafka versions the key "topic" is no longer accepted use either "topics": "fooTweets", or "topics.regex":"fooTweets"

jsing120 avatar Jun 16 '19 23:06 jsing120

@jsing120

There is still a problem. The topic has the name tweets, no matter what I add to the .properties file.

ThadeuFerreira avatar Oct 02 '19 02:10 ThadeuFerreira

@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 ?

Baresse avatar Jun 30 '20 18:06 Baresse