5 Replies Latest reply on Apr 24, 2014 9:10 AM by Andy Taylor

    Implementing Topic like behavior on Core API

    Yair Ogen Expert

      I have a wrapper API over hornetq core. I need to implement API for sending messages in 1:1 (A.K.A Queue) as well as 1:N (A.K.A Topic).


      In my view, the API should be clean and shouldn't mention "Topic" (which is more of a JMS concept). So I was thinking of only implementing a "sendToQueue" API where the topic behavior will be achieved by behind the scenes magic.


      My question is: what is that magic?


      One option I see is implementing a "createQueue" API that can accept (dynamically) client queue names and using Diverts to copy the message sent to the original queue to all the different "subscribers". That would probably work but it is a bit complex.


      Any other ideas how I can implement the topic like behavior?