**************************************************** * Soak Test For Manual Reconnection of JMS Clients * **************************************************** Running the Soak Tests ======================= The default soak tests with start a ActiveMQ Artemis instance, 1 producer and 1 consumer. To run the default suite. $mvn verify Run The Server Standalone ========================== If would like to run a number of servers or run the server on a different machine: To run server using the default configuration (server0, using localhost): $ mvn verify -Pserver To run multiple servers, you can specify the server configuration directory using server.dir system property (which defaults to server0). To run a 2nd server with a configuration stored in server1: $ mvn verify -Pserver -Dserver.dir=server1 server1 should contain a copy of configuration equivilent to that found under the server0 director with different settings. To run a server with the same configuration but on a different host. Check out this source on the host machine and change: * activemq.remoting.netty.host property in broker.xml * bindAddress and rmiBindAddress properties in activemq-beans.xml $ mvn verify -P server Configure Server Dump ===================== The server can "dump" info at regular interval. In broker.xml, set 10000 to have infos every 10s: **** Server Dump **** date: Mon Aug 17 18:19:07 CEST 2009 free memory: 500,79 MiB max memory: 1,95 GiB total memory: 507,13 MiB available memory: 99,68% total paging memory: 0,00 B # of thread: 19 # of conns: 0 ******************** Run The Clients =============== The clients can be run separate from the server using: $ mvn verify -Premote Parameters are specified in soak.properties. The duration of the tests is configured by duration-in-minutes (defaults to 2 minutes, set to -1 to run the test indefinitely). To configure the soak properties different to the defaults for the clients, use the system property To specify the JNDI server to connect to, use the system property jndi.address $ mvn verify -Premote -Dsoak.props= -Pjndi.address=jnp:remote.host:1099 Every 1000th message, the clients will display their recent activity: INFO: received 10000 messages in 5,71s (total: 55s) At the end of the run, the sender and receiver will sum up their activity: INFO: Received 223364 messages in 2,01 minutes Kill The Server And Check Manual Reconnection ============================================== You can kill the server (ctl+c or kill -9), the clients are configured to reconnect indefinitely to the same single server (even in case of clean shutdown) Once the server restarts, all the clients will resume their activities after reconnecting to the server.