-
1. Re: Consumer and Producer relationship in clustered hornetq environment
ataylor Mar 27, 2013 6:53 AM (in response to drisal)I am getting confusion regarding the consumer and producer relationship in clustered environment. I've read book, guide and forum but still confuse how to establish consumer and producer relationship.
There is no relationship, messaging systems are asynchronous so clients know nothing about each other.
While working in clustered environment, for message load balancing we use different instances of hornetq in different machine with different IP.
Should consumer have to know all machine's IP to retreive message that are distributed in different machines?
I think consumer shouldn't have to hesistate either machine is clustered or not.It should get all the message from one instance of any machine that are in clustered.
when messages arrive at a server they are round robined around all the consumers currently connected to the cluster. So if you're consumer is alive when you send your messages it will get the messages (unless you have misconfigured something). If no consumers are available the messages are sent to the local queue, the caveat here is if forward-when-no-consumers is true. Once a message is on a specific queue it will stay there unless you have enabled redistribution (i.e. redistribution-delay !=0). The user manual will have all this info in more detail if you need it.
-
2. Re: Consumer and Producer relationship in clustered hornetq environment
drisal Mar 28, 2013 1:30 AM (in response to drisal)I have attached diagram that illustrate my problem.
both producer and consumer connect to hornetq throug jndi.properties file where both of them connects to the node 192.168.72.11:1099
Using clustered, message are distributed in round robin fashioned and each node are getting equal number of message but the consumer that connected to 192.168.72.11:1099 retrieves message from that node only.
How could consumer get all the messages connected to that particular node.
-
jndi.properties.zip 297 bytes
-
hornetqc-configuration.xml 5.0 KB
-
hornetqb-configuration.xml 5.0 KB
-
hornetqa-configuration.xml 5.4 KB
-
-
3. Re: Consumer and Producer relationship in clustered hornetq environment
ataylor Mar 28, 2013 6:14 AM (in response to drisal)If your nodes have all joined the cluster then messages will be sent to all consumers, if not then maybe one fo the nodes hasnt joined. you should be able to see the cluster connections in the console.
Oh, and I cant see anything in the doc you attached, it's empty when i open it apart form a title
-
4. Re: Consumer and Producer relationship in clustered hornetq environment
drisal Mar 28, 2013 7:43 AM (in response to ataylor)Hello Andy,
Docx file consist simple diagram..i don't know what happen there, from here i can see the diagram.
Cluster connection is ok with all the node and the queue deployed on each node contain messages send by producer.The clustered environment is working properly, problem is in consumer side.Do i have to mention all the node IP and port address for consumer? Here i do have only one consumer which retrieve message from queue that is deployed in node (192.168.72.11:1099) as defined in jndi.properties file. The messages of other nodes in clustered apart from that particular node(192.168.72.11:1099) are still not dequeued by consumer.
I am confused what might be the problem?
I've attached configuration file of all instances of hornetq.
Please how can i fix this problem.