Sample code to publish a message to a topic using spring cloud stream api

Thank you @marc for your response, I would like to use option 1 in your reply, but I am not able to find details about _StreamBridge _object anywhere. I would like learn more about it. Any documentation or sample configuration and code about how to use it, is greatly appreciated. I am using maven dependency spring-cloud-starter-stream-solace version 2.0.1.
I am not sure which version you were mentioning in your comment(v3.0.5)