I would like to start discussion about sending non durable messages to HornetQ Standalone Server Queue when server is down or crashed. I'm using 2.3.0.Final version of HornetQ.
I'm in situation where my messages aren't important so much so I don't need it to be durable. What I want is where the HornetQ Standalone Server is down or crashed then I want that my clients applications (several Producers and one Consumer) didn't block to wait for HornetQ server to start again. I configured the connection factory on the server side this way:
<!-- Pause 1 second between connect attempts -->
<!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
pause is the same length -->
<!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
<!-- When the server is cleanly shutdown we don't want to give up, we want to continue
to try to reconnect -->
<!-- We need to specify a confirmation-window-size to enable re-attachment, default is -1 which
means no re-attachment.
We set in this scenario 10 MB window size
And the reconnection is working but my producers when try to send messages to the queue blocks for 10 seconds when the failover occurs. I want it to doesn't block at all just forget about sending messages when failover take place.
The Consumer application is working as I expected it block's and waiting for new messages even if Hornet goes down.
Can somebody show me the way hot to handle such situations.
Thanks a lot.