Message type for Object type (JAVA)
First things first, I'm a complete newb regarding Solace PubSub+. I'm trying to build a library to be used as a dependency that will deal with all the solace communication. In my case, I want the library to be abstract in a way where it does not care about what kind of information it is dealing with. My problem is that I don't really know how to:
- Publish only on method call - I could only make it publish periodically
- Or actually feed the Message prior to sending - on a different approach I had compared to the first point.
I'm using Spring Cloud for this, and my Solace configurations are within the library's application.yml (also tried to set on code but no good, so far) and the topics information is coming from the services, that are going to use the library, application.yml. This bit works completely fine.
Using "spring.cloud.function.definition" I was able to make the service use the library's pub/sub functions but it was calling the publish function on a loop - no good for me
Tried to create Publisher and Subscriber classes but I'm struggling to make the actual publishing and subscribing...
Back to my problem, TextMessage, BytesXMLMessage, and the rest, none of them accept any object to be created... please, help...