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

Thanks @marc , I was using the same code for testing and was not able to make it run properly. Intellij is just giving “Error running myTestFunction” after trying to resolve maven dependencies. I am thinking it is something to do with the dependencies I am using Can you please share your pom.xml file?
Thanks a lot for your help