azure-functions-kafka-extension
azure-functions-kafka-extension copied to clipboard
KafkaOutput Trigger throws an error if null value passed
I'm using kafka out trigger to push message but there is some business scenario which identify whether to pass message or not. But if we pass null to message it throws an error "Message value was not defined". Does this mean we cannot pass null or empty value in the message ? it force to pass something valid value if this is the case then how to handle the business scenario where there is no need to pass message.
Hi @Alpesh1984909090, Can you share more information on how you are setting the output value?
Hi @krishna-kariya,
Kafka output trigger is out parameter so have to assign some default value, but there is business scenario wherein I need to determine whether to write to topic or not. So if there is nothing to write on the topic it throws this error.
Hi @alpeshdhanesha, Can you share the function code? I tried setting the output message as null and it worked for me.