we are using PubSub+ Kafka source connector as a consumer, so is it possible to consumer the user defined header using PubSub+ Kafka source connector?
I assume you're asking about the "Try-Me" in PubSub+ Manager. If so, no it can't set user defined headers. Maybe one of these 2 options will work for you?
Hope that helps!
You can put whatever you'd like into the payload of the message. You would just have to make sure the consumers know what to expect so they can properly parse it.
But I would caution against not using user-defined properties just b/c the try-me tool doesn't allow you to do so. In many cases it makes a lot of sense to use user-defined properties as they can allow the consumers to know context about the message they are receiving. Things like an ApplicationMessageID, OrderID, type information, etc. are very common
Thanks @marc. I thought so - Can we include the user-defined headers in the message payload and process them in consumer applications ?
Not related to the Try Me! functionality: but if you're asking specifically about this Kafka source connector: https://github.com/SolaceProducts/pubsubplus-connector-kafka-source I just did a quick scan of the code and found no mentions of Header (Kafka) or SDTMap (Solace). So it doesn't appear that if User Properties are specified in the received Solace message, they will be passed through to the Kafka side.
Note the code is open source... you could either add the functionality yourself and submit a PR, or raise an Issue so we can track this as a feature request.
I will submit the feature enhancement request and work on submitting a PR in meantime.
Appreciated your support.