blocking send will only protect you for network failures. (Say if the server failed, hang during the protocol iterations between your client and server). You shouldn't see any timeout under regular circunstances.
(also, or eventually the server is too busy processing requests.. however HornetQ handles load pretty well... so you really need to pound the server beyond its limits to make this happen)
I actually would want it to time out as a defensive mechanism, similar to an overall call timeout or transaction timeout on a database query, to prevent the system from locking up. I take it there is no way to it at this time?
HornetQ is not a database, hence you won't see a scenario like in a database that a TX will be waiting something to release the lock on the server.
the only scenario a commit will take more than X seconds to happen is if you have resources issues or network issues, on which case you get a timetout.
I'm a little confused though, if you meant TX timeout for an opened TX. (say you left your TX open for a long time, without a commit)
For this cases (server failure), what will happen?
I had a case of "no space left on device" and my producers where left hanging. I don't know if they hang because of address_full_policy = BLOCK, or because of something else (I have no logs, because, the server had no space left on disk). Also, I'm about to test "sudden shutdowns" (to mimic power failures) and I'll surely have "network failures" as well. Can something be done to set a timeout in these cases? A timeout would be a given time after the QueueClient.send() message was called.
The stacktrace of hang:
Thread: Receiver-13932 : priority:5, demon:true, threadId:27404, threadState:WAITING
- waiting on <0x6cb562a2> (a java.util.concurrent.Semaphore$NonfairSync)
Thanks in advance,
I would also be interested in configuring a send timeout. In my case I have queue configured with fixed size and no paging (BLOCK) and would like the producers to back off when the queue is full (i.e. when they cannot put a message in a queue for a certain timeout). Is there a way to configure such a timeout on the connection factory?