runTest(Session.AUTO_ACKNOWLEDGE, 100, 10, 0, 0);
}
protected void runTest(int acknowledgeMode, int messageSize, int numberOfMessages, int batchSize, long publishInterval) throws Exception
{
final CreateProducerCommand command = new CreateProducerCommand();
command.setNumberOfMessages(numberOfMessages);
command.setDeliveryMode(DeliveryMode.PERSISTENT);
command.setParticipantName("test");
command.setMessageSize(messageSize);
command.setBatchSize(batchSize);
command.setInterval(publishInterval);
command.setSessionName("testSession");
command.setDestinationName(getTestQueueName());
Session session = _connection.createSession(Session.SESSION_TRANSACTED == acknowledgeMode, acknowledgeMode);
_delegate.addConnection("name-does-not-matter", _connection);
_delegate.addSession(command.getSessionName(), session);
_delegate.createProducer(command);
final ProducerParticipant producer = new ProducerParticipant(_delegate, command);
new ParticipantExecutor(producer).start(_client);