-
1. HornetQConnectionFactory.createQueueConnection won't close on System.exit()
hughbragg Mar 7, 2011 1:19 AM (in response to hughbragg)Shouldn't operations like this be using the InterruptibleChannel interface to do the work? Isn't this another anti-pattern?
Is this handled by Netty, and is there a way I can change this?
-
2. HornetQConnectionFactory.createQueueConnection won't close on System.exit()
ataylor Mar 7, 2011 3:32 AM (in response to hughbragg)By default we use the netty OioClientSocketChannelFactory which utilizes the old I/O API, to use NIO you can set use-nio to true on the connector. I'm assuming, but don't know for sure, that netty would use InterruptibleChannel under the covers. If i get a chance i'll check the netty source.
-
3. HornetQConnectionFactory.createQueueConnection won't close on System.exit()
hughbragg Mar 7, 2011 8:09 PM (in response to ataylor)So I set
connectionParams.put(TransportConstants.USE_NIO_PROP_NAME, Boolean.TRUE);
for the client and I can see that it's running the "New /IO client boss" thread,
but it takes up to 10 seconds for the thread to relinquish control and the program to terminate once it's the only thread left running.
-
4. HornetQConnectionFactory.createQueueConnection won't close on System.exit()
hughbragg Mar 8, 2011 8:47 PM (in response to hughbragg)If I send an interrupt signal to the daemon thread which starts the connection during the call to HornetQConnectionFactory.createQueueConnection() nothing happens. That Thread and the "New I/O client boss" both wait at least 10 seconds before exiting.
Looking through the Netty code, it just uses the daemon setting of the thread which creates it so I suppose HornetQ doesn't make itself a daemon thread. Looking further Netty uses NIO and has a connection timeout which is configurable. https://issues.jboss.org/browse/NETTY-204.
I'm not sure why, but I don't think HornetQ even provides a way to set the connection timeout and it seems to use the default OS value. There is a Call Timeout.
This is a bit of a problem as some OS set the connection timeout is 2 minutes in some cases.
Is there any way to set the connection timout with either OIO or NIO for HornetQ?
Why don't HornetQ connection threads exit when all other no daemon threads exit?
-
5. HornetQConnectionFactory.createQueueConnection won't close on System.exit()
ataylor Mar 9, 2011 2:11 AM (in response to hughbragg)If you raise a jira then we can expose the netty timeout.
-
6. HornetQConnectionFactory.createQueueConnection won't close on System.exit()
hughbragg Mar 9, 2011 6:16 PM (in response to ataylor)Thankyou very much Andy. I was hoping you would say that.