You have configured static cluster, the bridge will be created to the other node even if it's not connected and messages are building up on the bridge queue.
If you configure paging at # (global level) the bridge queue will also be paged, otherwise everything will build up on the page queue.
YOu have to proper configure the clusters so they can connect to each other.
I gave that a shot. Here's the new address settings for both mb1/cfg/hornetq-configuration.xml and mb2/cfg/hornetq-configuration.xml.
I again ran the ./run-clustered.sh (same as above) and still see the journal directory of one of the brokers growing well beyond what I expect.
Every 1.0s: du -ch mb1 mb2 Tue May 1 10:13:57 2012
And after I ctrl+c to end the sending client, the journal size remains the same.
You mentioned I need to properly configure the cluster nodes so they can connect to each other. What do I have misconfigured? I see messages going to both paging directories of the two nodes and the log messages indicate they are clustered.
I setup another example to show that both hornetq nodes are indeed clustered and connected.
In the new attachment, run the run-clustered-withsender.sh script. This will do the following -
- Build the client java code
- Start both hornetq nodes (same configuration as before)
- Start the sending application, which will send 100k messages to one of the two hornetq nodes (I have specifically set it up to connect to mb1)
- Stop the sending application
- Start the listening application, which will receive all 100k messages from the other hornetq node (I have specifically set it up to connect to mb2)
- Wait for all the messages to be recieved, then shutdown
- Stop the hornetq nodes
To execute the above, do the following:
When sending traffic, you can observe the paging directories on both nodes grow (as expected). On mb1, the journal directory also grows (I'm not sure why this occurs still).
When receiving traffic, the paging directory on mb1 shrinks right away (messages are forwarded mb2 as it has the listener, as expected) and the mb2 paging directory shrinks as messages are consumed.
Getting back to my original question and concern, I simply need a way to limit the size the journal directory. Is there a way to set a hard limit on the size of the journal directory or number of journal files that can be created?
hornetq-test.tgz 13.7 MB