-
1. Re: How do I configure clustered JMS Topic behavior but using the core API
clebert.suconic Aug 25, 2010 11:40 AM (in response to justinkwaugh)There is no such thing as topic on the core api.. Everything is a queue...
You can Multiple queues with a single Address.
JMS Topic subscriptions are mapped internally to a core-queue, bound to the main address.
-
2. Re: How do I configure clustered JMS Topic behavior but using the core API
justinkwaugh Aug 25, 2010 12:57 PM (in response to clebert.suconic)Thanks for the response. How do jms topics then have broadcast behavior in a cluster vs round robin?
-
3. Re: How do I configure clustered JMS Topic behavior but using the core API
clebert.suconic Aug 25, 2010 2:42 PM (in response to justinkwaugh)It should be done through cluster connections.
Looko at the Clustered Topic examples. The address there is <address>jms</address> as all jms queues will start with jms.
If you want to have a specific core-address on the list, just add a clustering connection matching your address, with the proper discovery group.
The PostOffice should deliver all messages from the address to the other servers.
-
4. Re: How do I configure clustered JMS Topic behavior but using the core API
justinkwaugh Aug 25, 2010 2:50 PM (in response to clebert.suconic)I apologize if i'm sounding a bit dense here, but I'm still a little unclear. I have successfully set up a jms topic in a cluster. No problems there. Messages get delivered to all the consumers on all the nodes without round robining.
But, I am interested in accomplishing the same thing using the core api. So I've set up a clustered connection with an address. I've created queues on all the nodes for that address. But when I send to a queue, it round robins to the nodes (as I believe the documentation says it should). So i'm wondering how to make it send to all nodes of the cluster, instead of round robin, without using the jms facade.
I appreciate your patience in helping me understand.
-
5. Re: How do I configure clustered JMS Topic behavior but using the core API
clebert.suconic Aug 25, 2010 3:57 PM (in response to justinkwaugh)You just need to have queues bound to a specific address.. say MyAddress...
When you produce, you will send towards the address... And the messages will be distributed to all the nodes accordingly to the cluster connection.
I have changed the Clustered Topic a bit to explain you how it works (attached here).
(I can't add it officially now to the list of examples as I would need to tight up the example, change variable names.. tight up the readme.. etc).
Or I will add it right away if you or someone make it pretty :-)
-
multi-queues-clustered.zip 12.3 KB
-
-
6. Re: How do I configure clustered JMS Topic behavior but using the core API
clebert.suconic Aug 25, 2010 6:28 PM (in response to clebert.suconic)Also: notice that each subscription is a queue... So you need multiple queues bound to the same address. That's probably what you needed to understand.
-
7. Re: How do I configure clustered JMS Topic behavior but using the core API
timfox Aug 26, 2010 5:27 AM (in response to justinkwaugh)The relevant information is here:
http://hornetq.sourceforge.net/docs/hornetq-2.1.2.Final/user-manual/en/html/using-core.html#d0e1294
http://hornetq.sourceforge.net/docs/hornetq-2.1.2.Final/user-manual/en/html/jms-core-mapping.html
Once you understand how a JMS topic maps to core message concepts it should become clear,
Separating JMS queues and JMS topics was actually introducing redundancy in the JMS specification. You can model both JMS queues and topics by just having queues which are bound to addresses.
A jms queue is just an address with one core queue bound to it. A jms topic is an address with zero or more core queues bound to it (each topic subscription maps to a core queue).
This is a simpler way to model both point to point and publish subscribe messaging than JMS.