-
1. Re: Understanding HornetQ Cluster and Bridge working
jbertram Apr 16, 2012 9:46 PM (in response to into_java)Q 1. Now when on Machine 1 - queue1 receive E1,E3,E4,E6 message is it copied over and send over network using the bridge connection internally to Machine 2. In this way if Machine 1 goes down then Machine 2 will be have a complete Copy of messages in clustered queue1 and when machine 1 comes up can sync it over the network to it.
Messages are not replicated between cluster nodes. If one node in a cluster goes down then the persistent messages on that node will be unavailable until that node comes alive again unless that node has a backup. The live/backup configuration where 2 nodes share the same journal is the only configuration which supports the high availability of messages. The live/backup configuration is active/passive. You can read more about high-availability and fail-over in the documentation.
Q2. If on Machine 2 if a Consumer consumes a message say E2 then is there a internal message which will be send to Machine 1 to remove E2 from its queue1. IN Short does consumption of message lead to messaging to other nodes in cluster to delete the E2's from its queue.
Since messages are not replicated between cluster nodes this isn't necessary.
Please note that message replication will be supported in the future.
-
2. Re: Understanding HornetQ Cluster and Bridge working
into_java Apr 16, 2012 10:44 PM (in response to jbertram)Hi Justin,
The reason for my understanding of why message are replicated is this.
Messages are not replicated between cluster nodes.
While Putting any message in queue1 i am using this property
clientM.putStringProperty(ClientMessage.HDR_DUPLICATE_DETECTION_ID, uid);
As a result of this what i am achieveing is lets say in the above diagram If E1 event happens Again and is routed to Machine 2 (rather than Machine 1 as in case of first E1) by load balancer then the Message doesnt get in to the queue1 of Machine 2. This is the duplicate detection which drops the message.
How does machine 2 know to drop E1 if E1 is not duplicated.
In Short I have seen Duplicate detection work on a Clustered queue1. So how will it work if the messages are not duplicated.
Q2. If what you say is correct and there is no duplication ...How can i achieve a consumer which will be able to get the correct order of elements out of queue (E1(from M1)...E2(from M2).....E3(from M3)...etc)