-
1. Re: Question about timeout on blocking send
clebert.suconic Nov 1, 2010 9:07 AM (in response to karlicontrol)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.
-
2. Re: Question about timeout on blocking send
clebert.suconic Nov 1, 2010 9:08 AM (in response to clebert.suconic)(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)
-
3. Re: Question about timeout on blocking send
karlicontrol Nov 1, 2010 1:38 PM (in response to clebert.suconic)Thanks Clebert.
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?
Karl
-
4. Re: Question about timeout on blocking send
clebert.suconic Nov 1, 2010 3:11 PM (in response to karlicontrol)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)
-
5. Re: Question about timeout on blocking send
leomrlima Jan 11, 2011 9:23 AM (in response to clebert.suconic)Hello!
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)
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:969)
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1281)
java.util.concurrent.Semaphore.acquire(Semaphore.java:441)
org.hornetq.core.client.impl.ClientProducerCreditsImpl.acquireCredits(ClientProducerCreditsImpl.java:67)
org.hornetq.core.client.impl.ClientProducerImpl.doSend(ClientProducerImpl.java:303)
org.hornetq.core.client.impl.ClientProducerImpl.send(ClientProducerImpl.java:139)
org.hornetq.jms.client.HornetQMessageProducer.doSend(HornetQMessageProducer.java:451)
org.hornetq.jms.client.HornetQMessageProducer.send(HornetQMessageProducer.java:199)Thanks in advance,
Leo.
-
6. Re: Question about timeout on blocking send
eparchas Dec 14, 2011 2:38 PM (in response to clebert.suconic)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?