|
|
|
@ -71,6 +71,10 @@ public class TbKafkaNode implements TbNode { |
|
|
|
|
|
|
|
@Override |
|
|
|
public void init(TbContext ctx, TbNodeConfiguration configuration) throws TbNodeException { |
|
|
|
// Ugly workaround to fix org.apache.kafka.common.KafkaException: javax.security.auth.login.LoginException: unable to find LoginModule class
|
|
|
|
// details: https://stackoverflow.com/questions/57574901/kafka-java-client-classloader-doesnt-find-sasl-scram-login-class
|
|
|
|
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); |
|
|
|
|
|
|
|
this.config = TbNodeUtils.convert(configuration, TbKafkaNodeConfiguration.class); |
|
|
|
Properties properties = new Properties(); |
|
|
|
properties.put(ProducerConfig.CLIENT_ID_CONFIG, "producer-tb-kafka-node-" + ctx.getSelfId().getId().toString() + "-" + ctx.getServiceId()); |
|
|
|
|