-
Notifications
You must be signed in to change notification settings - Fork 116
Additional options for kafka clients #2281
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
Conversation
Adapt KafkaHelpers and AlarmClient to allow passing kafka_properties file Change all instances using AlarmClient to new signature
|
While there are many little changes, they're all just about adding a new Can you add some example for how to actually use ssl encryption and authentication? xxx =yyy |
|
Documentation would be great, @mgotz could you open a new PR with the documentation |
|
Wonderful, I will add some documentation and make a new PR |
|
@mgotz recently a discussion regarding the kafka group.id came up. Is there a use case on your end where you would want o manage the group.id in a properties files instead of having a globally unique one being assigned at runtime for the service and clients? I would like to remove the conditional check... and instead always set a uuid irrespective of what is set in the properties file. |
|
I don't have a use case to manage the group.id in the properties file. |
I wanted to enable ssl encryption and authentication for the kafka communications in the alarm-system. This reqires several additional settings for the kafka consumer and producers.
This PR adds a kafka_properties preference to the phoebus client and a corresponding cmd option to the alarm-server, alarm-logger and alarm-config-logger. This preference is a path to a properties file to load additional kafka-client properties from. The properties file format and content is the same as the one for the kafka-console clients. This should provide a lot of flexibility to configure the kafka clients without adding a lot of extra preferences to phoebus.
In addition, I tried to add this to the existing cmd parse logic in the alarm-server. However, I found it very complicated to add an additional argument in the existing structure, while also ensuring that all combinations and also orders of arguments work properly. So, I rewrote the cmd argument parsing making the processing independent of the order the arguments were given. Hopefully, this makes it a bit more flexible and it removed some of the repetitive code.