Produce Message
Let’s see how we can produce or publish message to topic using kafka connector
Create project in anypoint studio
Drag and drop publish operation for apache kafka from mule palette(add the kafka module if not present on mule palette)
configure the topic name
Configure Bootstrap server URLs on the connector configuration
Create the payload to send the message on kafka topic
Deploy the application and test
Message published successfully, you can run the below command and see the published message
Alternatively you can also use the consume operation to consume the published message
kafka-console-consumer.bat –bootstrap-server localhost:9092 –topic test –from-beginning
Can I consume message from Kafka prepared topic ?