
export AMQ_URL="(tcp://localhost:61616,tcp://localhost:61617)?ha=true;sslEnabled=false"
export AMQ_USER=admin AMQ_PASS=admin AMQ_CONSOLE=http://localhost:8161

time for x in seq 1 20
do
  # Run the producer
  time for i in `seq -f '%02g' 1 8`
  do
  ./artemis producer --url $AMQ_URL --user $AMQ_USER --password $AMQ_PASS --destination queue://test-$i --message-size 500 --txt-size 500 --threads 5 --message-count 20000 2>&1
  done

  #Run the consumer
  time for i in `seq -f '%02g' 1 8`
  do
  ./artemis consumer --url $AMQ_URL --user $AMQ_USER --password $AMQ_PASS --destination queue://test-$i --txt-size 1000 --threads 5 --message-count 20000 2>&1
  done
  echo "Finished roundtrip attemp $x"
done 
