I have a java object for interfacing with a Weblogic JMS server. I'd like to be able to take these messages from the JMS and work with them in clojure. With my limited knowledge the best way I could think doing this would be via channels from the clojure async library. But I am unsure if I can publish to a clojure channel from a Java object.
My ideal flow would be:
- Java object receives message from JMS subscription
- Java publishes message to a channel
- Clojure has a thread listening to that channel and receives the message
- I do my processing on that message once received from the clojure channel.
I also need to make sure these messages are received in the same order I receive them from Java.
Is there a way to use the async libraries channels to work from within a java object, or am I barking up the wrong tree with this methodology?