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

Kafka connector fallback hosts need to be explicitly added to the connector properties #185

Open
mclark-ably opened this issue Jun 26, 2024 · 0 comments

Comments

@mclark-ably
Copy link
Contributor

mclark-ably commented Jun 26, 2024

When using the Kafka connector fallback hosts aren't tried and the batch publish fails and goes to dlq (if configured) if the request times out

connector          | io.ably.lib.types.AblyException$HostFailedException: java.lang.Exception: connect timed out
connector          |    at io.ably.lib.types.AblyException.fromErrorInfo(AblyException.java:32)
connector          |    at io.ably.lib.types.AblyException.fromErrorInfo(AblyException.java:25)
connector          |    at io.ably.lib.http.Http$Request.sync(Http.java:45)
connector          |    at io.ably.lib.http.HttpPaginatedQuery.exec(HttpPaginatedQuery.java:56)
connector          |    at io.ably.lib.http.HttpPaginatedQuery.exec(HttpPaginatedQuery.java:40)
connector          |    at io.ably.lib.rest.AblyBase.request(AblyBase.java:288)
connector          |    at com.ably.kafka.connect.client.DefaultAblyBatchClient.sendBatches(DefaultAblyBatchClient.java:188)
connector          |    at com.ably.kafka.connect.client.DefaultAblyBatchClient.publishBatch(DefaultAblyBatchClient.java:90)
connector          |    at com.ably.kafka.connect.batch.BatchProcessingThread.run(BatchProcessingThread.java:36)
connector          |    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
connector          |    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
connector          |    at java.base/java.lang.Thread.run(Thread.java:834)
connector          | Caused by: java.lang.Exception: connect timed out
connector          |    ... 11 more```

it appears in the connector config that the list of fallbacks is an empty list 
`connector          |    client.fallback.hosts = []`

The fallback host client option is set to this which overwrites the default fallback hosts which would be set on a Java SDK client if the fallback host option was not set

https://github.com/ably/kafka-connect-ably/blob/4d782f2e21a35521776aaee12387329ce4f0ad6c/src/main/java/com/ably/kafka/connect/config/ChannelSinkConnectorConfig.java#L218C9-L218C84

Workaround: Add the fallbacks explicitly to the connector config

┆Issue is synchronized with this [Jira Task](https://ably.atlassian.net/browse/ECO-4853) by [Unito](https://www.unito.io)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant