Configure Thread Management
To configure a ClientSessionFactory instance to use its own pools, simply use the appropriate setter methods immediately after creation, for example: ClientSessionFactory myFactory = HornetQClient.createClientSessionFactory(...); myFactory.setUseGlobalPools(false); myFactory.setScheduledThreadPoolMaxSize(10); myFactory.setThreadPoolMaxSize(-1); If you're using the JMS API, you can set the same parameters on the ClientSessionFactory and use it to create the ConnectionFactory instance, for example: ConnectionFactory myConnectionFactory = HornetQJMSClient.createConnectionFactory(myFactory); If you're using JNDI to instantiate HornetQConnectionFactory instances, you can also set these parameters in the hornetq-jms.xml file where you describe your connection factory, for example: false 10 -1