Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.

Fixing problems with SSL, timeout and auto creation of topics #269

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

mian3010
Copy link

@mian3010 mian3010 commented Jun 12, 2019

The following changes has been made:

  • New configuration: autoCreateTopicsEnable. Whether or not Kafka cluster has been set up to automatically create topics, when they do not exist. This also means changing the RecordValidator and producer code
  • Moved configuration of timeout to config instead of on socket class. This adds 4 new configuration options: sendTimeoutSec, sendTimeoutUsec, recvTimeoutSec, recvTimeoutUsec
  • Changed SSL implementation, to only set properties that are set in config, instead of just setting them to empty string. Setting eg. certificate file or private key to empty string makes OpenSSL think it is getting a client certificate, even though you are not using client certificates.
  • New configuration: sslVerifyPeerName. Whether or not to verify the SSL peer name, not the same as sslVerifyPeer. I used it for local development, where i had an SSH tunnel to a Kafka-server, therefore the hostnames were not matching.
  • Create init function in SyncProducer, otherwise logger was never set, as it was retrieved in the constructor, and set via setter-method.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant