Configuring Apache NiFi for sending messages to Message Hub

690 Views Asked by At

What properties do I need to set to start sending messages from Apache NiFi PublishKafka processor to Message Hub in IBM Cloud?

enter image description here

I have entered these values for the reference

enter image description here

I am doing this on Ubuntu 18.04

1

There are 1 best solutions below

2
Mickael Maison On

You need to set the following Dynamic Property:

sasl.mechanism=PLAIN

You also need to specify your credentials for SASL, use the username/password from your Message Hub instance:

  • with PublishKafka_1_0, you also need to specify another Dynamic Property:

    sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required  username="USERNAME" password="PASSWORD";
    
  • with PublishKafka_0_11, you need to create a JAAS file as described in the SASL PLAIN section in NiFi's docs. /org.apache.nifi.processors.kafka.pubsub.PublishKafka_0_11/additionalDetails.html

    You can also check How do you connect NIFI to IBM MessageHub through PublishKafka processor? for a JAAS file example.