openwhisk-deploy-kube
openwhisk-deploy-kube copied to clipboard
Do I need the kafka package to ingest kafka messages with this project ?
I have been successfully able to deploy this project with kind and trigger actions. My goal was to get a kafka feed setup to trigger an action via a rule but no matter what I do it seems like my kafka feed does not pick up the messages. It appears as if it successfully creates the trigger and a response is recevied it looks like from the logs but messages don't propagate. Is it possible I am missing stuff from here : https://github.com/apache/openwhisk-package-kafka
Hi, I haven't actually played with the Kafka feed for a while, so can't rule out that something might have rotted. But, the openwhisk-package-kafka code should be installed by the install-packages job when you deployed using the helm chart.
its possible it is deployed, but is not configured correctly. I'd suggest first making sure the package/actions are there. Then trying to look to see if the actions are running and perhaps failing. Also look at the logs of the kafkaprovider pod and see if it is reporting any errors.
I have been successfully able to deploy this project with kind and trigger actions. My goal was to get a kafka feed setup to trigger an action via a rule but no matter what I do it seems like my kafka feed does not pick up the messages. It appears as if it successfully creates the trigger and a response is recevied it looks like from the logs but messages don't propagate. Is it possible I am missing stuff from here : https://github.com/apache/openwhisk-package-kafka
Try do the following:
- Follow generic kafka, it is simpler
- If create successful trigger then go to section, produce generic kafka event
There is this command: wsk_ action invoke /messaging/kafkaProduce -p brokers "["mykafkahost:9092", "mykafkahost:9093"]" -p topic mytopic -p value "This is the content of my message"
It is missing the correct path (actually is /whisk.system/messaging/kafkaProduce). Also by default in your deployment there is only one broker at 9092. To find the write port you have to check the interal IP of kafka image (for me was 10.1.0.182:9092)
So your command to create and invoke should be:
wsk trigger create MyKafkaTrigger0 -f /whisk.system/messaging/kafkaFeed -p brokers "[\"10.1.0.182:9092\"]" -p topic mytopic -p isJSONData true
andwsk action invoke whisk.system/messaging/kafkaProduce -p brokers "[\"10.1.0.182:9092\"]" -p topic mytopic -p value "This is the content of my message" --blocking
where 10.1.0.182 is the ip of the already deployed kafka pod - If the above fail, consider invoke the trigger via npm library, it is built in and easy to use, check here [(https://github.com/apache/openwhisk-client-js#fire-trigger)]