summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2007-10-20 01:47:08 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2007-10-20 01:47:08 +0000
commitee922dea4d6faa72daf15cef32cb1f78ee8c3215 (patch)
tree6aba2a832a7df3c43331c38e53bee903f3d90a02
parent02b37ab4a61b56ee8145c9548390807d8d7b6241 (diff)
parent6e0d585943d5ca5cdbc3891abc04c1f2d0dabe4b (diff)
downloadqpid-python-ee922dea4d6faa72daf15cef32cb1f78ee8c3215.tar.gz
Tagging the M2 branch for the final release
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/tags/M2/Final@586656 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--cpp/lib/broker/SessionHandlerImpl.cpp2
-rw-r--r--cpp/lib/client/ClientChannel.cpp6
-rw-r--r--cpp/lib/common/Makefile.am1
-rw-r--r--cpp/lib/common/sys/apr/APRSocket.cpp1
-rw-r--r--cpp/lib/common/sys/apr/LFSessionContext.cpp2
-rw-r--r--cpp/tests/Makefile.am8
-rw-r--r--cpp/tests/P2PMessageSizeTest.cpp114
-rw-r--r--cpp/tests/P2PMessageSizeTest.h58
-rw-r--r--cpp/tests/PubSubMessageSizeTest.cpp125
-rw-r--r--cpp/tests/PubSubMessageSizeTest.h51
-rw-r--r--cpp/tests/SimpleTestCaseBase.cpp68
-rw-r--r--cpp/tests/SimpleTestCaseBase.h117
-rw-r--r--cpp/tests/TestCase.h21
-rw-r--r--cpp/tests/TestUtils.cpp53
-rw-r--r--cpp/tests/TestUtils.h32
-rw-r--r--cpp/tests/interop_runner.cpp9
-rw-r--r--dotnet/Qpid.Client.Tests/Qpid.Client.Tests.csproj1
-rw-r--r--dotnet/Qpid.Client.Tests/default.build21
-rw-r--r--dotnet/Qpid.Client.Tests/failover/FailoverTest.cs390
-rw-r--r--dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs253
-rw-r--r--dotnet/Qpid.Client.Tests/log4net.config106
-rw-r--r--dotnet/Qpid.Client/Client/Protocol/AMQProtocolListener.cs159
-rw-r--r--dotnet/Qpid.Client/Client/Transport/IoHandler.cs5
-rw-r--r--dotnet/Qpid.Client/qms/FailoverPolicy.cs2
-rw-r--r--dotnet/Qpid.Common/AMQConnectionClosedException.cs13
-rw-r--r--dotnet/RELEASE_NOTES.txt1
-rw-r--r--java/broker/etc/log4j.xml1
-rw-r--r--java/broker/pom.xml8
-rwxr-xr-xjava/broker/python-test.xml106
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java2
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/ack/UnacknowledgedMessage.java2
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/handler/BasicRejectMethodHandler.java22
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java8
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/queue/AMQMessage.java25
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java9
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java200
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/queue/DeliveryManager.java2
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/queue/SubscriptionImpl.java4
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java37
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/txn/TxnBuffer.java28
-rw-r--r--java/broker/src/test/java/org/apache/qpid/server/RunBrokerWithCommand.java4
-rw-r--r--java/broker/src/test/java/org/apache/qpid/server/exchange/ExchangeMBeanTest.java6
-rw-r--r--java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java128
-rw-r--r--java/broker/src/test/java/org/apache/qpid/server/store/TestableMemoryMessageStore.java73
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/AMQConnection.java102
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/AMQConnectionFactory.java21
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/AMQSession.java722
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/AMQTemporaryTopic.java3
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java209
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java20
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java9
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java126
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/state/listener/SpecificMethodFrameListener.java16
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/transport/TransportConnection.java138
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/util/FlowControllingBlockingQueue.java7
-rw-r--r--java/client/src/test/java/org/apache/mina/transport/vmpipe/support/VmPipeIdleStatusChecker.java125
-rw-r--r--java/client/src/test/java/org/apache/qpid/client/AMQQueueDeferredOrderingTest.java152
-rw-r--r--java/client/src/test/java/org/apache/qpid/client/ResetMessageListenerTest.java25
-rw-r--r--java/client/src/test/java/org/apache/qpid/client/SpecificMethodFrameListenerTest.java71
-rw-r--r--java/client/src/test/java/org/apache/qpid/test/unit/basic/LargeMessageTest.java5
-rw-r--r--java/client/src/test/java/org/apache/qpid/test/unit/basic/PubSubTwoConnectionTest.java1
-rw-r--r--java/client/src/test/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseOkTest.java1
-rw-r--r--java/client/src/test/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseTest.java77
-rw-r--r--java/client/src/test/java/org/apache/qpid/test/unit/client/connection/ConnectionStartTest.java53
-rw-r--r--java/client/src/test/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java4
-rw-r--r--java/client/src/test/java/org/apache/qpid/test/unit/client/protocol/AMQProtocolSessionTest.java120
-rw-r--r--java/client/src/test/java/org/apache/qpid/test/unit/close/MessageRequeueTest.java103
-rw-r--r--java/client/src/test/java/org/apache/qpid/test/unit/topic/DurableSubscriptionTest.java60
-rw-r--r--java/client/src/test/java/org/apache/qpid/test/unit/topic/TopicSessionTest.java18
-rw-r--r--java/client/src/test/java/org/apache/qpid/test/unit/transacted/CommitRollbackTest.java51
-rw-r--r--java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java41
-rw-r--r--java/common/src/main/java/org/apache/qpid/framing/AMQShortString.java1
-rw-r--r--java/common/src/main/java/org/apache/qpid/framing/FieldTable.java5
-rw-r--r--java/integrationtests/src/main/java/org/apache/qpid/interop/clienttestcases/TestCase4P2PMessageSize.java214
-rw-r--r--java/integrationtests/src/main/java/org/apache/qpid/interop/clienttestcases/TestCase5PubSubMessageSize.java243
-rw-r--r--java/integrationtests/src/main/java/org/apache/qpid/interop/testcases/InteropTestCase4P2PMessageSize.java193
-rw-r--r--java/integrationtests/src/main/java/org/apache/qpid/interop/testcases/InteropTestCase5PubSubMessageSize.java193
-rw-r--r--java/integrationtests/src/main/java/org/apache/qpid/test/framework/distributedtesting/TestClient.java7
-rw-r--r--java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java5
-rwxr-xr-xjava/perftests/bin/run_many.sh30
-rwxr-xr-xjava/perftests/bin/topicListener.sh33
-rwxr-xr-xjava/perftests/bin/topicPublisher.sh32
-rw-r--r--java/perftests/distribution/pom.xml4
-rw-r--r--java/perftests/pom.xml553
-rw-r--r--java/perftests/src/main/java/org/apache/qpid/oldtopic/Config.java243
-rw-r--r--java/perftests/src/main/java/org/apache/qpid/oldtopic/Listener.java141
-rw-r--r--java/perftests/src/main/java/org/apache/qpid/oldtopic/MessageFactory.java153
-rw-r--r--java/perftests/src/main/java/org/apache/qpid/oldtopic/Publisher.java175
-rw-r--r--java/perftests/src/main/java/org/apache/qpid/ping/PingAsyncTestPerf.java2
-rw-r--r--java/perftests/src/main/java/org/apache/qpid/ping/PingClient.java4
-rw-r--r--java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java484
-rw-r--r--java/pom.xml4
-rw-r--r--java/systests/src/main/java/org/apache/mina/transport/vmpipe/support/VmPipeIdleStatusChecker.java125
-rw-r--r--java/systests/src/main/java/org/apache/qpid/server/failure/DeadlockTest.java211
-rw-r--r--java/systests/src/main/java/org/apache/qpid/server/queue/AckTest.java18
-rw-r--r--java/systests/src/main/java/org/apache/qpid/server/queue/MessageReturnTest.java315
-rw-r--r--java/systests/src/main/java/org/apache/qpid/server/queue/QueueDepthWithSelectorTest.java214
-rw-r--r--java/systests/src/main/java/org/apache/qpid/server/store/TestableMemoryMessageStore.java26
-rw-r--r--java/systests/src/main/java/org/apache/qpid/server/txn/TxnBufferTest.java12
-rw-r--r--java/systests/src/main/java/org/apache/qpid/server/txn/TxnTest.java188
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/ExceptionMonitor.java16
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/TestUtils.java47
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/Coordinator.java103
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/LocalCircuitImpl.java10
-rw-r--r--python/tests/basic.py51
105 files changed, 6354 insertions, 2265 deletions
diff --git a/cpp/lib/broker/SessionHandlerImpl.cpp b/cpp/lib/broker/SessionHandlerImpl.cpp
index 0bea721175..b23432e29d 100644
--- a/cpp/lib/broker/SessionHandlerImpl.cpp
+++ b/cpp/lib/broker/SessionHandlerImpl.cpp
@@ -138,8 +138,6 @@ void SessionHandlerImpl::initiated(qpid::framing::ProtocolInitiation* header){
client = new qpid::framing::AMQP_ClientProxy(context, header->getMajor(), header->getMinor());
- std::cout << "---------------" << this << std::endl;
-
//send connection start
FieldTable properties;
string mechanisms("PLAIN");
diff --git a/cpp/lib/client/ClientChannel.cpp b/cpp/lib/client/ClientChannel.cpp
index 4ec0d87eeb..a97d79dcf9 100644
--- a/cpp/lib/client/ClientChannel.cpp
+++ b/cpp/lib/client/ClientChannel.cpp
@@ -258,9 +258,7 @@ void Channel::rollback(){
void Channel::handleMethod(AMQMethodBody::shared_ptr body){
//channel.flow, channel.close, basic.deliver, basic.return or a response to a synchronous request
- if(responses.isWaiting()){
- responses.signalResponse(body);
- }else if(method_bodies.basic_deliver.match(body.get())){
+ if(method_bodies.basic_deliver.match(body.get())){
if(incoming != 0){
std::cout << "Existing message not complete [deliveryTag=" << incoming->getDeliveryTag() << "]" << std::endl;
THROW_QPID_ERROR(PROTOCOL_ERROR + 504, "Existing message not complete");
@@ -280,6 +278,8 @@ void Channel::handleMethod(AMQMethodBody::shared_ptr body){
}else if(method_bodies.channel_flow.match(body.get())){
+ } else if(responses.isWaiting()){
+ responses.signalResponse(body);
}else{
//signal error
std::cout << "Unhandled method: " << *body << std::endl;
diff --git a/cpp/lib/common/Makefile.am b/cpp/lib/common/Makefile.am
index 3700b640a0..b2e2de2cf1 100644
--- a/cpp/lib/common/Makefile.am
+++ b/cpp/lib/common/Makefile.am
@@ -125,6 +125,7 @@ nobase_pkginclude_HEADERS = \
$(framing)/Value.h \
$(framing)/amqp_framing.h \
$(framing)/amqp_types.h \
+ $(posix_hdr) \
Exception.h \
ExceptionHolder.h \
QpidError.h \
diff --git a/cpp/lib/common/sys/apr/APRSocket.cpp b/cpp/lib/common/sys/apr/APRSocket.cpp
index 4917803370..f68d51d8e4 100644
--- a/cpp/lib/common/sys/apr/APRSocket.cpp
+++ b/cpp/lib/common/sys/apr/APRSocket.cpp
@@ -53,7 +53,6 @@ void APRSocket::write(qpid::framing::Buffer& buffer){
void APRSocket::close(){
if(!closed){
- std::cout << "Closing socket " << socket << "@" << this << std::endl;
CHECK_APR_SUCCESS(apr_socket_close(socket));
closed = true;
}
diff --git a/cpp/lib/common/sys/apr/LFSessionContext.cpp b/cpp/lib/common/sys/apr/LFSessionContext.cpp
index a06b7537ee..8a7ce18136 100644
--- a/cpp/lib/common/sys/apr/LFSessionContext.cpp
+++ b/cpp/lib/common/sys/apr/LFSessionContext.cpp
@@ -158,7 +158,7 @@ void LFSessionContext::close(){
void LFSessionContext::handleClose(){
handler->closed();
APRPool::free(fd.p);
- std::cout << "Session closed [" << &socket << "]" << std::endl;
+ if (debug) std::cout << "Session closed [" << &socket << "]" << std::endl;
delete handler;
delete this;
}
diff --git a/cpp/tests/Makefile.am b/cpp/tests/Makefile.am
index 09ccda8686..256e68058d 100644
--- a/cpp/tests/Makefile.am
+++ b/cpp/tests/Makefile.am
@@ -126,12 +126,18 @@ gen.mk: Makefile.am
check_PROGRAMS = interop_runner
interop_runner_SOURCES = \
interop_runner.cpp \
+ TestUtils.cpp \
SimpleTestCaseBase.cpp \
BasicP2PTest.cpp \
BasicPubSubTest.cpp \
+ P2PMessageSizeTest.cpp \
+ PubSubMessageSizeTest.cpp \
+ TestUtils.h \
SimpleTestCaseBase.h \
BasicP2PTest.h \
BasicPubSubTest.h \
+ P2PMessageSizeTest.h \
+ PubSubMessageSizeTest.h \
TestCase.h \
- TestOptions.h
+ TestOptions.h
interop_runner_LDADD = $(lib_client) $(lib_common) $(extra_libs)
diff --git a/cpp/tests/P2PMessageSizeTest.cpp b/cpp/tests/P2PMessageSizeTest.cpp
new file mode 100644
index 0000000000..20ddb6e2aa
--- /dev/null
+++ b/cpp/tests/P2PMessageSizeTest.cpp
@@ -0,0 +1,114 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+#include "P2PMessageSizeTest.h"
+
+using namespace qpid;
+using namespace qpid::client;
+
+/**
+ * P2PMessageSizeTest::Receiver is a Worker to play the receiving role in P2P test.
+ *
+ * TODO: This code is identical to the receiver in BasicP2PTest so should share implementation with that.
+ */
+class P2PMessageSizeTest::Receiver : public Worker, public MessageListener
+{
+ /** Holds the name of the queue to send the test message on. */
+ const std::string queue;
+
+ /** Used for ? */
+ std::string tag;
+
+public:
+
+ /**
+ * Creates a new Worker from given the TestOptions. The namd of the queue, to consume from is also specified.
+ *
+ * @param options The test options to configure the worker with.
+ * @param _queue The name of the queue to consume from on the default direct exchange.
+ * @param _mesages The expected number of messages to consume. Ignored.
+ */
+ Receiver(TestOptions& options, const std::string& _queue, const int _messages)
+ : Worker(options, _messages), queue(_queue)
+ {}
+
+ /**
+ * Binds this receivers queue to the standard exchange, and starts the dispatcher thread on its channel.
+ */
+ void init()
+ {
+ Queue q(queue, true);
+ channel.declareQueue(q);
+ framing::FieldTable args;
+ channel.bind(Exchange::STANDARD_DIRECT_EXCHANGE, q, queue, args);
+ channel.consume(q, tag, this);
+ channel.start();
+ }
+
+ /**
+ * Does nothing.
+ */
+ void start()
+ {
+ }
+
+ /**
+ * Increments the message count, on every message received.
+ *
+ * @param message The test message. Ignored.
+ */
+ void received(Message& )
+ {
+ count++;
+ }
+};
+
+/**
+ * Assigns the role to be played by this test case. The test parameters are fully specified in the
+ * assignment messages filed table. If the role is "SENDER" a Sender worker is created to delegate
+ * the test functionality to, if the role is "RECEIVER" a Receiver is used.
+ *
+ * @param role The role to be played; sender or receiver.
+ * @param assignRoleMessage The role assingment messages field table, contains the full test parameters.
+ * @param options Additional test options.
+ */
+void P2PMessageSizeTest::assign(const std::string& role, framing::FieldTable& params, TestOptions& options)
+{
+ std::string queue = params.getString("P2P_QUEUE_AND_KEY_NAME");
+
+ int messages = params.getInt("P2P_NUM_MESSAGES");
+ int messageSize = params.getInt("messageSize");
+
+ if (role == "SENDER")
+ {
+ worker = std::auto_ptr<Worker>(new Sender(options, Exchange::STANDARD_DIRECT_EXCHANGE, queue, messages, messageSize));
+ }
+ else if(role == "RECEIVER")
+ {
+ worker = std::auto_ptr<Worker>(new Receiver(options, queue, messages));
+ }
+ else
+ {
+ throw Exception("unrecognised role");
+ }
+
+ worker->init();
+}
diff --git a/cpp/tests/P2PMessageSizeTest.h b/cpp/tests/P2PMessageSizeTest.h
new file mode 100644
index 0000000000..c434e74f4d
--- /dev/null
+++ b/cpp/tests/P2PMessageSizeTest.h
@@ -0,0 +1,58 @@
+#ifndef _P2PMessageSizeTest_
+#define _P2PMessageSizeTest_
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+#include <memory>
+#include <sstream>
+
+#include <ClientChannel.h>
+#include <ClientMessage.h>
+#include <Connection.h>
+#include <Exception.h>
+#include <MessageListener.h>
+#include "SimpleTestCaseBase.h"
+
+namespace qpid {
+
+/**
+ * P2PMessageSizeTest implements test case 4, P2P messages with message size. Sends/received a specified number of messages to a
+ * specified route on the default exchange, of a specified size. Produces reports on the actual number of messages sent/received.
+ */
+class P2PMessageSizeTest : public SimpleTestCaseBase
+{
+ class Receiver;
+
+public:
+
+ /**
+ * Assigns the role to be played by this test case. The test parameters are fully specified in the
+ * assignment messages filed table.
+ *
+ * @param role The role to be played; sender or receiver.
+ * @param assignRoleMessage The role assingment messages field table, contains the full test parameters.
+ * @param options Additional test options.
+ */
+ void assign(const std::string& role, framing::FieldTable& params, TestOptions& options);
+};
+}
+
+#endif
diff --git a/cpp/tests/PubSubMessageSizeTest.cpp b/cpp/tests/PubSubMessageSizeTest.cpp
new file mode 100644
index 0000000000..e75334d989
--- /dev/null
+++ b/cpp/tests/PubSubMessageSizeTest.cpp
@@ -0,0 +1,125 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+#include "PubSubMessageSizeTest.h"
+
+using namespace qpid;
+
+class PubSubMessageSizeTest::Receiver : public Worker, public MessageListener
+{
+ const Exchange& exchange;
+ const std::string queue;
+ const std::string key;
+ std::string tag;
+public:
+ Receiver(TestOptions& options, const Exchange& _exchange, const std::string& _queue, const std::string& _key, const int _messages)
+ : Worker(options, _messages), exchange(_exchange), queue(_queue), key(_key){}
+
+ void init()
+ {
+ Queue q(queue, true);
+ channel.declareQueue(q);
+ framing::FieldTable args;
+ channel.bind(exchange, q, key, args);
+ channel.consume(q, tag, this);
+ channel.start();
+ }
+
+ void start(){
+ }
+
+ void received(Message&)
+ {
+ count++;
+ }
+};
+
+class PubSubMessageSizeTest::MultiReceiver : public Worker, public MessageListener
+{
+ typedef boost::ptr_vector<Receiver> ReceiverList;
+ ReceiverList receivers;
+
+public:
+ MultiReceiver(TestOptions& options, const Exchange& exchange, const std::string& key, const int _messages, int receiverCount)
+ : Worker(options, _messages)
+ {
+ for (int i = 0; i != receiverCount; i++) {
+ std::string queue = (boost::format("%1%_%2%") % options.clientid % i).str();
+ receivers.push_back(new Receiver(options, exchange, queue, key, _messages));
+ }
+ }
+
+ void init()
+ {
+ for (ReceiverList::size_type i = 0; i != receivers.size(); i++) {
+ receivers[i].init();
+ }
+ }
+
+ void start()
+ {
+ for (ReceiverList::size_type i = 0; i != receivers.size(); i++) {
+ receivers[i].start();
+ }
+ }
+
+ void received(Message& msg)
+ {
+ for (ReceiverList::size_type i = 0; i != receivers.size(); i++) {
+ receivers[i].received(msg);
+ }
+ }
+
+ virtual int getCount()
+ {
+ count = 0;
+ for (ReceiverList::size_type i = 0; i != receivers.size(); i++) {
+ count += receivers[i].getCount();
+ }
+ return count;
+ }
+ virtual void stop()
+ {
+ for (ReceiverList::size_type i = 0; i != receivers.size(); i++) {
+ receivers[i].stop();
+ }
+ }
+};
+
+void PubSubMessageSizeTest::assign(const std::string& role, framing::FieldTable& params, TestOptions& options)
+{
+ //std::cout << "void PubSubMessageSizeTest::assign(const std::string& role, framing::FieldTable& params, TestOptions& options): called";
+
+ std::string key = params.getString("PUBSUB_KEY");
+ int messages = params.getInt("PUBSUB_NUM_MESSAGES");
+ int receivers = params.getInt("PUBSUB_NUM_RECEIVERS");
+ int messageSize = params.getInt("messageSize");
+
+ if (role == "SENDER") {
+ worker = std::auto_ptr<Worker>(new Sender(options, Exchange::STANDARD_TOPIC_EXCHANGE, key, messages, messageSize));
+ } else if(role == "RECEIVER"){
+ worker = std::auto_ptr<Worker>(new MultiReceiver(options, Exchange::STANDARD_TOPIC_EXCHANGE, key, messages, receivers));
+ } else {
+ throw Exception("unrecognised role");
+ }
+ worker->init();
+}
+
diff --git a/cpp/tests/PubSubMessageSizeTest.h b/cpp/tests/PubSubMessageSizeTest.h
new file mode 100644
index 0000000000..c17f81fc1e
--- /dev/null
+++ b/cpp/tests/PubSubMessageSizeTest.h
@@ -0,0 +1,51 @@
+#ifndef _PubSubMessageSizeTest_
+#define _PubSubMessageSizeTest_
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+#include <memory>
+#include <sstream>
+
+#include <ClientChannel.h>
+#include <ClientMessage.h>
+#include <Connection.h>
+#include <Exception.h>
+#include <MessageListener.h>
+#include "SimpleTestCaseBase.h"
+#include <boost/ptr_container/ptr_vector.hpp>
+#include <boost/format.hpp>
+
+
+namespace qpid {
+
+using namespace qpid::client;
+
+class PubSubMessageSizeTest : public SimpleTestCaseBase
+{
+ class Receiver;
+ class MultiReceiver;
+public:
+ void assign(const std::string& role, framing::FieldTable& params, TestOptions& options);
+};
+
+}
+
+#endif
diff --git a/cpp/tests/SimpleTestCaseBase.cpp b/cpp/tests/SimpleTestCaseBase.cpp
index 691f2b0652..3603df3af3 100644
--- a/cpp/tests/SimpleTestCaseBase.cpp
+++ b/cpp/tests/SimpleTestCaseBase.cpp
@@ -21,49 +21,98 @@
#include "SimpleTestCaseBase.h"
using namespace qpid;
+using namespace qpid::client;
+/**
+ * Starts the test cases worker.
+ */
void SimpleTestCaseBase::start()
{
- if (worker.get()) {
+ if (worker.get())
+ {
worker->start();
}
}
+/**
+ * Stops the test cases worker.
+ */
void SimpleTestCaseBase::stop()
{
- if (worker.get()) {
+ if (worker.get())
+ {
worker->stop();
}
}
+/**
+ * Adds the test report to the specified message. This consists of writing the count of messages received into
+ * a header on the message.
+ *
+ * @param report The report message to add the test report to.
+ */
void SimpleTestCaseBase::report(client::Message& report)
{
- if (worker.get()) {
+ if (worker.get())
+ {
report.getHeaders().setInt("MESSAGE_COUNT", worker->getCount());
- //add number of messages sent or received
+
+ // Add number of messages sent or received in the message body.
+ /*
std::stringstream reportstr;
reportstr << worker->getCount();
report.setData(reportstr.str());
+ */
}
}
+/**
+ * Creates a sender using the specified options, for the given expected message count, exchange and routing key.
+ * This sets up the sender with the default message size for interop tests.
+ *
+ * @param options The creation options.
+ * @param exchange The exchange to send the messages over.
+ * @param key The routing key for the messages.
+ * @param messages The number of messages expected to be sent or received.
+ */
SimpleTestCaseBase::Sender::Sender(TestOptions& options,
const Exchange& _exchange,
const std::string& _key,
const int _messages)
- : Worker(options, _messages), exchange(_exchange), key(_key) {}
+ : Worker(options, _messages), exchange(_exchange), key(_key), messageSize(DEFAULT_INTEROP_MESSAGE_SIZE) {}
+
+/**
+ * Creates a sender using the specified options, for the given expected message count, exchange and routing key.
+ *
+ * @param options The creation options.
+ * @param exchange The exchange to send the messages over.
+ * @param key The routing key for the messages.
+ * @param messages The number of messages expected to be sent or received.
+ * @param messageSize The size of test messages to send.
+ */
+SimpleTestCaseBase::Sender::Sender(TestOptions& options,
+ const Exchange& _exchange,
+ const std::string& _key,
+ const int _messages,
+ const int _messageSize)
+ : Worker(options, _messages), exchange(_exchange), key(_key), messageSize(_messageSize) {}
void SimpleTestCaseBase::Sender::init()
{
channel.start();
}
-void SimpleTestCaseBase::Sender::start(){
- Message msg;
- while (count < messages) {
- channel.publish(msg, exchange, key);
+void SimpleTestCaseBase::Sender::start()
+{
+ Message message;
+ qpid::createTestMessageOfSize(message, messageSize);
+
+ while (count < messages)
+ {
+ channel.publish(message, exchange, key);
count++;
}
+
stop();
}
@@ -84,4 +133,3 @@ int SimpleTestCaseBase::Worker::getCount()
{
return count;
}
-
diff --git a/cpp/tests/SimpleTestCaseBase.h b/cpp/tests/SimpleTestCaseBase.h
index 818ab3b315..66f87ae42a 100644
--- a/cpp/tests/SimpleTestCaseBase.h
+++ b/cpp/tests/SimpleTestCaseBase.h
@@ -30,59 +30,158 @@
#include <Exception.h>
#include <MessageListener.h>
#include "TestCase.h"
+#include "TestUtils.h"
+#define DEFAULT_INTEROP_MESSAGE_SIZE 256
namespace qpid {
using namespace qpid::client;
+/**
+ * SimpleTestCaseBase defines a base implementation of TestCase class. It provides the ability, to wrap a 'Worker' that
+ * the work of running a test case is delegated too. There are two kinds of workers provided, a base worker, which is abstract
+ * and may be extended to provide the tests behaviour, and a 'Sender' worker, that provides the ability to send a number
+ * of messages.
+ *
+ * <p/>A worker encapsulates a connection, a channel, an expected number of messages to be sent or received, and a count of the
+ * number actually sent or received.
+ */
class SimpleTestCaseBase : public TestCase
{
protected:
+
+ /**
+ * A worker encapsulates a connection, channel, an expected number of messages to be sent or received, and a count of the
+ * number actually sent or received.
+ *
+ * <p/>Worker is an abstract class, extend it to do something usefull on the init() and start() methods.
+ *
+ * <p/>A worker is created from a set of TestOptions, which captures a number of configuration parameters, such as the
+ * broker to connect to.
+ *
+ * TODO: Extend TestOptions to capture the full set of creation properties for distributed tests.
+ */
class Worker
{
protected:
+ /** Holds the connection for the worker to send/receive over. */
client::Connection connection;
+
+ /** Holds the channel for the worker to send/receive over. */
client::Channel channel;
+
+ /** Holds the expected number of messages for the worker to send or received. */
const int messages;
+
+ /** Holds a count of the number of messages actually sent or received. */
int count;
public:
+ /**
+ * Creates a worker using the specified options, for the given expected message count.
+ *
+ * @param options The creation options.
+ * @param messages The number of messages expected to be sent or received.
+ */
Worker(TestOptions& options, const int messages);
virtual ~Worker(){}
+
+ /** Should be called ahead of start() to configure the worker. */
+ virtual void init() = 0;
+
+ /** Starts the workers test activity. */
+ virtual void start() = 0;
+ /** Terminates the workers test activity. */
virtual void stop();
+
+ /** Gets the count of messages actually sent or received by the worker. */
virtual int getCount();
- virtual void init() = 0;
- virtual void start() = 0;
};
+ /**
+ * Sender is a worker that sends the expected number of messages to be sent, over the configured exchange, using a
+ * specified routing key.
+ */
class Sender : public Worker
{
+ /** Holds the exchange to send message to. */
const Exchange& exchange;
+
+ /** Holds the routing key for the messages. */
const std::string key;
+
+ /** Holds the message size parameter for all test messages. */
+ const int messageSize;
+
public:
- Sender(TestOptions& options,
- const Exchange& exchange,
- const std::string& key,
- const int messages);
+
+ /**
+ * Creates a sender using the specified options, for the given expected message count, exchange and routing key.
+ *
+ * @param options The creation options.
+ * @param exchange The exchange to send the messages over.
+ * @param key The routing key for the messages.
+ * @param messages The number of messages expected to be sent or received.
+ */
+ Sender(TestOptions& options, const Exchange& exchange, const std::string& key, const int messages);
+
+ /**
+ * Creates a sender using the specified options, for the given expected message count, exchange and routing key.
+ *
+ * @param options The creation options.
+ * @param exchange The exchange to send the messages over.
+ * @param key The routing key for the messages.
+ * @param messages The number of messages expected to be sent or received.
+ * @param messageSize The size of test messages to send.
+ */
+ Sender(TestOptions& options, const Exchange& exchange, const std::string& key, const int messages, const int messageSize);
+
+ /**
+ * Starts the underlying channel.
+ */
void init();
+
+ /**
+ * Sends the specified number of messages over the connection, channel and exchange using the configured routing key.
+ */
void start();
};
+ /** Holds a pointer to the encapsulated worker. */
std::auto_ptr<Worker> worker;
public:
- virtual void assign(const std::string& role, framing::FieldTable& params, TestOptions& options) = 0;
-
+
virtual ~SimpleTestCaseBase() {}
+ /**
+ * Assigns the role to be played by this test case. The test parameters are fully specified in the
+ * assignment messages filed table.
+ *
+ * @param role The role to be played; sender or receiver.
+ * @param assignRoleMessage The role assingment messages field table, contains the full test parameters.
+ * @param options Additional test options.
+ */
+ virtual void assign(const std::string& role, framing::FieldTable& params, TestOptions& options) = 0;
+
+ /**
+ * Starts the worker.
+ */
void start();
+
+ /**
+ * Stops the worker.
+ */
void stop();
+
+ /**
+ * Reports the number of messages sent or received.
+ */
void report(client::Message& report);
};
-
}
#endif
diff --git a/cpp/tests/TestCase.h b/cpp/tests/TestCase.h
index a88b76bc1d..ec151a6d84 100644
--- a/cpp/tests/TestCase.h
+++ b/cpp/tests/TestCase.h
@@ -28,28 +28,39 @@
namespace qpid {
/**
- * Interface to be implemented by test cases for use with the test
- * runner.
+ * TestCase provides an interface that classes implementing tests to be run using a distributed test client
+ * must implement. The interop test spec, defines a life-cycle for interop tests. This consists of, inviting
+ * a test to participate in a test, assigning a role, starting the test, and extracting a report on the
+ * outcome of the test.
+ *
+ * TODO: There is not method to process the test invitation. Add one.
*/
class TestCase
{
public:
+
/**
- * Directs the test case to act in a particular role. Some roles
- * may be 'activated' at this stage others may require an explicit
- * start request.
+ * Assigns the role to be played by this test case. The test parameters are fully specified in the
+ * assignment messages filed table.
+ *
+ * @param role The role to be played; sender or receiver.
+ * @param assignRoleMessage The role assingment messages field table, contains the full test parameters.
+ * @param options Additional test options.
*/
virtual void assign(const std::string& role, framing::FieldTable& params, TestOptions& options) = 0;
+
/**
* Each test will be started on its own thread, which should block
* until the test completes (this may or may not require an
* explicit stop() request).
*/
virtual void start() = 0;
+
/**
* Requests that the test be stopped if still running.
*/
virtual void stop() = 0;
+
/**
* Allows the test to fill in details on the final report
* message. Will be called only after start has returned.
diff --git a/cpp/tests/TestUtils.cpp b/cpp/tests/TestUtils.cpp
new file mode 100644
index 0000000000..0b517a4339
--- /dev/null
+++ b/cpp/tests/TestUtils.cpp
@@ -0,0 +1,53 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+#include "TestUtils.h"
+#include <string>
+
+using namespace qpid;
+
+/**
+ * Creates a test message of the specified size. The message is filled with dummy (non-zero) data.
+ *
+ * @param size The size of the message to create.
+ */
+void qpid::createTestMessageOfSize(qpid::client::Message& message, int size)
+{
+ std::string MESSAGE_DATA("-- Test Message -- Test Message -- Test Message -- Test Message -- Test Message -- Test Message -- Test Message ");
+ std::string data;
+
+ if (size > 0)
+ {
+ int div = MESSAGE_DATA.length() / size;
+ int mod = MESSAGE_DATA.length() % size;
+
+ for (int i = 0; i < div; i++)
+ {
+ data += MESSAGE_DATA;
+ }
+
+ if (mod != 0)
+ {
+ data += MESSAGE_DATA.substr(0, mod);
+ }
+ }
+
+ message.setData(data);
+}
diff --git a/cpp/tests/TestUtils.h b/cpp/tests/TestUtils.h
new file mode 100644
index 0000000000..1178a4e06f
--- /dev/null
+++ b/cpp/tests/TestUtils.h
@@ -0,0 +1,32 @@
+#ifndef _TestUtils_
+#define _TestUtils_
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+#include <ClientMessage.h>
+
+namespace qpid {
+
+void createTestMessageOfSize(qpid::client::Message& message, int size);
+
+}
+
+#endif
diff --git a/cpp/tests/interop_runner.cpp b/cpp/tests/interop_runner.cpp
index 3dd87a0735..7cb9f1ead5 100644
--- a/cpp/tests/interop_runner.cpp
+++ b/cpp/tests/interop_runner.cpp
@@ -33,6 +33,8 @@
#include <memory>
#include "BasicP2PTest.h"
#include "BasicPubSubTest.h"
+#include "P2PMessageSizeTest.h"
+#include "PubSubMessageSizeTest.h"
#include "TestCase.h"
#include <boost/ptr_container/ptr_map.hpp>
@@ -92,6 +94,7 @@ public:
};
/**
+ * TODO: Add clock synching. CLOCK_SYNCH command is currently ignored.
*/
int main(int argc, char** argv){
TestOptions options;
@@ -111,6 +114,8 @@ int main(int argc, char** argv){
listener.registerTest("TC1_DummyRun", new DummyRun());
listener.registerTest("TC2_BasicP2P", new qpid::BasicP2PTest());
listener.registerTest("TC3_BasicPubSub", new qpid::BasicPubSubTest());
+ listener.registerTest("TC4_P2PMessageSize", new qpid::P2PMessageSizeTest());
+ listener.registerTest("TC5_PubSubMessageSize", new qpid::PubSubMessageSizeTest());
listener.bindAndConsume();
@@ -184,10 +189,12 @@ void Listener::received(Message& message)
std::string name(message.getHeaders().getString("TEST_NAME"));
if (name.empty() || invite(name)) {
sendSimpleResponse("ENLIST", message);
+ //std::cout << "Enlisting in test '" << name << "'" << std::endl;
} else {
std::cout << "Can't take part in '" << name << "'" << std::endl;
}
} else if (type == "ASSIGN_ROLE") {
+ //std::cout << "Got role assignment request for '" << name << "'" << std::endl;
test->assign(message.getHeaders().getString("ROLE"), message.getHeaders(), options);
sendSimpleResponse("ACCEPT_ROLE", message);
} else if (type == "START") {
@@ -202,6 +209,8 @@ void Listener::received(Message& message)
} else if (type == "TERMINATE") {
if (test != tests.end()) test->stop();
shutdown();
+ } else if (type == "CLOCK_SYNCH") {
+ // Just ignore for now.
} else {
std::cerr <<"ERROR!: Received unknown control message: " << type << std::endl;
shutdown();
diff --git a/dotnet/Qpid.Client.Tests/Qpid.Client.Tests.csproj b/dotnet/Qpid.Client.Tests/Qpid.Client.Tests.csproj
index a1a34d480d..16f73ea621 100644
--- a/dotnet/Qpid.Client.Tests/Qpid.Client.Tests.csproj
+++ b/dotnet/Qpid.Client.Tests/Qpid.Client.Tests.csproj
@@ -56,7 +56,6 @@
<Compile Include="connection\ConnectionTest.cs" />
<Compile Include="connection\SslConnectionTest.cs" />
<Compile Include="failover\FailoverTest.cs" />
- <Compile Include="failover\FailoverTxTest.cs" />
<Compile Include="HeadersExchange\HeadersExchangeTest.cs" />
<Compile Include="interop\TopicListener.cs" />
<Compile Include="interop\TopicPublisher.cs" />
diff --git a/dotnet/Qpid.Client.Tests/default.build b/dotnet/Qpid.Client.Tests/default.build
index e7fb81dae5..d1b1496a8b 100644
--- a/dotnet/Qpid.Client.Tests/default.build
+++ b/dotnet/Qpid.Client.Tests/default.build
@@ -28,19 +28,22 @@
file="log4net.config"
/>
</target>
+
<target name="test" depends="build">
- <nunit2>
+ <nunit2>
<formatter type="${nant.formatter}" usefile="false" />
<test>
- <assemblies>
- <include name="${build.dir}/${project::get-name()}.tests.dll"/>
- </assemblies>
- <categories>
- <exclude name="Failover"/>
- <exclude name="SSL" if="${framework::get-target-framework() == 'mono-2.0'}"/>
- </categories>
+ <assemblies>
+ <include name="${build.dir}/${project::get-name()}.tests.dll"/>
+ </assemblies>
+ <categories>
+ <!-- The fail-over tests are interactive so should not be run as part of the build. -->
+ <exclude name="Failover"/>
+ <exclude name="SSL" if="${framework::get-target-framework() == 'mono-2.0'}"/>
+ </categories>
</test>
- </nunit2>
+ </nunit2>
</target>
+
</project>
diff --git a/dotnet/Qpid.Client.Tests/failover/FailoverTest.cs b/dotnet/Qpid.Client.Tests/failover/FailoverTest.cs
index 1f1e2f726c..15e2eb6757 100644
--- a/dotnet/Qpid.Client.Tests/failover/FailoverTest.cs
+++ b/dotnet/Qpid.Client.Tests/failover/FailoverTest.cs
@@ -19,6 +19,7 @@
*
*/
using System;
+using System.Runtime.InteropServices;
using System.Threading;
using log4net;
using NUnit.Framework;
@@ -30,228 +31,289 @@ namespace Apache.Qpid.Client.Tests.failover
[TestFixture, Category("Failover")]
public class FailoverTest : IConnectionListener
{
- private static readonly ILog _logger = LogManager.GetLogger(typeof(FailoverTest));
+ private static readonly ILog _log = LogManager.GetLogger(typeof(FailoverTest));
- private IConnection _connection;
- private IChannel _channel;
- private IMessagePublisher _publisher;
- private int _count;
+ /// <summary>Specifies the number of times to run the test cycle.</summary>
+ const int NUM_MESSAGES = 10;
- private IMessageConsumer _consumerOfResponse;
+ /// <summary>Determines how many messages to send within each commit.</summary>
+ const int COMMIT_BATCH_SIZE = 1;
- void DoFailoverTest(IConnectionInfo info)
- {
- DoFailoverTest(new AMQConnection(info));
- }
+ /// <summary>Specifies the duration of the pause to place between each message sent in the test.</summary>
+ //const int SLEEP_MILLIS = 1;
- void DoFailoverTest(IConnection connection)
- {
- AMQConnection amqConnection = (AMQConnection)connection;
- amqConnection.ConnectionListener = this;
- //Console.WriteLine("connection.url = " + amqConnection.ToURL());
- _connection = connection;
- _connection.ExceptionListener = new ExceptionListenerDelegate(OnConnectionException);
- _channel = _connection.CreateChannel(false, AcknowledgeMode.NoAcknowledge);
+ /// <summary>Specified the maximum time in milliseconds to wait for the test to complete.</summary>
+ const int TIMEOUT = 10000;
- string exchangeName = ExchangeNameDefaults.TOPIC;
- string routingKey = "topic1";
+ /// <summary>Defines the number of test messages to send, before prompting the user to fail a broker.</summary>
+ const int FAIL_POINT = 5;
- string queueName = DeclareAndBindTemporaryQueue(exchangeName, routingKey);
-
- new MsgListener(_connection.CreateChannel(false, AcknowledgeMode.NoAcknowledge), queueName);
+ /// <summary>Specified the ack mode to use for the test.</summary>
+ AcknowledgeMode _acknowledgeMode = AcknowledgeMode.AutoAcknowledge;
- IChannel channel = _channel;
+ /// <summary>Determines whether this test runs transactionally or not. </summary>
+ bool transacted = false;
- string tempQueueName = channel.GenerateUniqueName();
- channel.DeclareQueue(tempQueueName, false, true, true);
- _consumerOfResponse = channel.CreateConsumerBuilder(tempQueueName).Create();
- _consumerOfResponse.OnMessage = new MessageReceivedDelegate(OnMessage);
+ /// <summary>Holds the connection to run the test over.</summary>
+ AMQConnection _connection;
- _connection.Start();
+ /// <summary>Holds the channel for the test message publisher. </summary>
+ IChannel publishingChannel;
- IMessage msg = _channel.CreateTextMessage("Init");
- // FIXME: Leaving ReplyToExchangeName as default (i.e. the default exchange)
- // FIXME: but the implementation might not like this as it defaults to null rather than "".
- msg.ReplyToRoutingKey = tempQueueName;
-// msg.ReplyTo = new ReplyToDestination("" /* i.e. the default exchange */, tempQueueName);
- _logger.Info(String.Format("sending msg.Text={0}", ((ITextMessage)msg).Text));
-
-// _publisher = _channel.CreatePublisher(exchangeName, exchangeClass, routingKey);
- _publisher = _channel.CreatePublisherBuilder()
- .WithRoutingKey(routingKey)
- .WithExchangeName(exchangeName)
- .Create();
- _publisher.Send(msg);
- }
+ /// <summary>Holds the test message publisher. </summary>
+ IMessagePublisher publisher;
- public string DeclareAndBindTemporaryQueue(string exchangeName, string routingKey)
- {
- string queueName = _channel.GenerateUniqueName();
+ /// <summary>Used to keep count of the number of messages sent. </summary>
+ int messagesSent;
- // Queue.Declare
- _channel.DeclareQueue(queueName, false, true, true);
+ /// <summary>Used to keep count of the number of messages received. </summary>
+ int messagesReceived;
- // Queue.Bind
- _channel.Bind(queueName, exchangeName, routingKey);
- return queueName;
- }
+ /// <summary>Used to wait for test completion on. </summary>
+ private static object testComplete = new Object();
- private void OnConnectionException(Exception e)
+ /// <summary>
+ /// Creates the test connection with a fail-over set up, and a producer/consumer pair on that connection.
+ /// </summary>
+ /// [SetUp]
+ public void Init(IConnectionInfo connectionInfo)
{
- _logger.Error("Connection exception occurred", e);
- }
+ // Reset all counts.
+ messagesSent = 0;
+ messagesReceived = 0;
- public void OnMessage(IMessage message)
- {
- try
- {
- _logger.Info("received message on temp queue msg.Text=" + ((ITextMessage)message).Text);
- Thread.Sleep(1000);
- _publisher.Send(_channel.CreateTextMessage("Message" + (++_count)));
- }
- catch (QpidException e)
- {
- error(e);
- }
- }
+ // Create a connection for the test.
+ _connection = new AMQConnection(connectionInfo);
+ _connection.ConnectionListener = this;
- private void error(Exception e)
- {
- _logger.Error("exception received", e);
- stop();
- }
+ // Create a consumer to receive the test messages.
+ IChannel receivingChannel = _connection.CreateChannel(false, _acknowledgeMode);
- private void stop()
- {
- _logger.Info("Stopping...");
- try
- {
- _connection.Dispose();
- }
- catch (QpidException e)
- {
- _logger.Error("Failed to shutdown", e);
- }
- }
+ string queueName = receivingChannel.GenerateUniqueName();
+ receivingChannel.DeclareQueue(queueName, false, true, true);
+ receivingChannel.Bind(queueName, "amq.direct", queueName);
- public void BytesSent(long count)
- {
- }
+ IMessageConsumer consumer = receivingChannel.CreateConsumerBuilder(queueName)
+ .WithPrefetchLow(30)
+ .WithPrefetchHigh(60).Create();
- public void BytesReceived(long count)
- {
+ consumer.OnMessage = new MessageReceivedDelegate(OnMessage);
+ _connection.Start();
+
+ // Create a publisher to send the test messages.
+ publishingChannel = _connection.CreateChannel(transacted, AcknowledgeMode.NoAcknowledge);
+ publisher = publishingChannel.CreatePublisherBuilder()
+ .WithRoutingKey(queueName)
+ .Create();
+
+ _log.Debug("connection = " + _connection);
+ _log.Debug("connectionInfo = " + connectionInfo);
+ _log.Debug("connection.AsUrl = " + _connection.toURL());
+ _log.Debug("AcknowledgeMode is " + _acknowledgeMode);
}
- public bool PreFailover(bool redirect)
+ /// <summary>
+ /// Clean up the test connection.
+ /// </summary>
+ [TearDown]
+ public virtual void Shutdown()
{
- _logger.Info("preFailover(" + redirect + ") called");
- return true;
+ Thread.Sleep(2000);
+ _connection.Close();
}
- public bool PreResubscribe()
+ /// <summary>
+ /// Runs a failover test, building up the connection information from its component parts. In particular the brokers
+ /// to fail between are seperately added into the connection info.
+ /// </summary>
+ /*[Test]
+ public void TestWithBasicInfo()
{
- _logger.Info("preResubscribe() called");
- return true;
- }
+ _log.Debug("public void TestWithBasicInfo(): called");
+
+ // Manually create the connection parameters.
+ QpidConnectionInfo connectionInfo = new QpidConnectionInfo();
+ connectionInfo.AddBrokerInfo(new AmqBrokerInfo("amqp", "localhost", 5672, false));
+ connectionInfo.AddBrokerInfo(new AmqBrokerInfo("amqp", "localhost", 5673, false));
- public void FailoverComplete()
+ Init(connectionInfo);
+ DoFailoverTest();
+ }*/
+
+ /// <summary>
+ /// Runs a failover test, with the failover configuration specified in the Qpid connection URL format.
+ /// </summary>
+ [Test]
+ public void TestWithUrl()
{
- _logger.Info("failoverComplete() called");
+ _log.Debug("public void runTestWithUrl(): called");
+
+ // Parse the connection parameters from a URL.
+ String clientId = "failover" + DateTime.Now.Ticks;
+ string defaultUrl = "amqp://guest:guest@" + clientId + "/test" +
+ "?brokerlist='tcp://localhost:5672;tcp://localhost:5673'&failover='roundrobin'";
+ IConnectionInfo connectionInfo = QpidConnectionInfo.FromUrl(defaultUrl);
+
+ Init(connectionInfo);
+ DoFailoverTest();
}
- private class MsgListener
+ /// <summary>
+ /// Send the test messages, prompting at the fail point for the user to cause a broker failure. The test checks that all messages sent
+ /// are received within the test time limit.
+ /// </summary>
+ ///
+ /// <param name="connectionInfo">The connection parameters, specifying the brokers to fail between.</param>
+ void DoFailoverTest()
{
- private IChannel _session;
- private IMessagePublisher _publisher;
+ _log.Debug("void DoFailoverTest(IConnectionInfo connectionInfo): called");
- internal MsgListener(IChannel session, string queueName)
+ for (int i = 1; i <= NUM_MESSAGES; ++i)
{
- _session = session;
- _session.CreateConsumerBuilder(queueName).Create().OnMessage =
- new MessageReceivedDelegate(OnMessage);
- }
+ ITextMessage msg = publishingChannel.CreateTextMessage("message=" + messagesSent);
+ //_log.Debug("sending message = " + msg.Text);
+ publisher.Send(msg);
+ messagesSent++;
- public void OnMessage(IMessage message)
- {
- try
+ _log.Debug("messagesSent = " + messagesSent);
+
+ if (transacted)
{
- _logger.Info("Received: msg.Text = " + ((ITextMessage) message).Text);
- if(_publisher == null)
- {
- _publisher = init(message);
- }
- reply(message);
+ publishingChannel.Commit();
}
- catch (QpidException e)
+
+ // Prompt the user to cause a failure if at the fail point.
+ if (i == FAIL_POINT)
{
-// Error(e);
- _logger.Error("yikes", e); // XXX
+ PromptAndWait("Cause a broker failure now, then press return...");
}
+
+ //Thread.Sleep(SLEEP_MILLIS);
}
- private void reply(IMessage message)
+ // Wait for all of the test messages to be received, checking that this occurs within the test time limit.
+ bool withinTimeout;
+
+ lock(testComplete)
+ {
+ withinTimeout = Monitor.Wait(testComplete, TIMEOUT);
+ }
+
+ if (!withinTimeout)
{
- string msg = ((ITextMessage) message).Text;
- _logger.Info("sending reply - " + msg);
- _publisher.Send(_session.CreateTextMessage(msg));
+ Assert.Fail("Test timed out, before all messages received.");
}
- private IMessagePublisher init(IMessage message)
+ _log.Debug("void DoFailoverTest(IConnectionInfo connectionInfo): exiting");
+ }
+
+ /// <summary>
+ /// Receives all of the test messages.
+ /// </summary>
+ ///
+ /// <param name="message">The newly arrived test message.</param>
+ public void OnMessage(IMessage message)
+ {
+ try
{
- _logger.Info(string.Format("creating reply producer with dest = '{0}:{1}'",
- message.ReplyToExchangeName, message.ReplyToRoutingKey));
+ if (_acknowledgeMode == AcknowledgeMode.ClientAcknowledge)
+ {
+ message.Acknowledge();
+ }
+
+ messagesReceived++;
- string exchangeName = message.ReplyToExchangeName;
- string routingKey = message.ReplyToRoutingKey;
+ _log.Debug("messagesReceived = " + messagesReceived);
- //return _channel.CreatePublisher(exchangeName, exchangeClass, routingKey);
- return _session.CreatePublisherBuilder()
- .WithExchangeName(exchangeName)
- .WithRoutingKey(routingKey)
- .Create();
+ // Check if all of the messages in the test have been received, in which case notify the message producer that the test has
+ // succesfully completed.
+ if (messagesReceived == NUM_MESSAGES)
+ {
+ lock (testComplete)
+ {
+ Monitor.Pulse(testComplete);
+ }
+ }
+ }
+ catch (QpidException e)
+ {
+ _log.Fatal("Exception received. About to stop.", e);
+ Stop();
}
}
- [Test]
- public void TestFail()
+ /// <summary>Prompts the user on stdout and waits for a reply on stdin, using the specified prompt message.</summary>
+ ///
+ /// <param name="message">The message to prompt the user with.</param>
+ private void PromptAndWait(string message)
{
- Assert.Fail("Tests in this class do not pass, but hang forever, so commented out until can be fixed.");
+ Console.WriteLine("\n" + message);
+ Console.ReadLine();
}
- /*[Test]
- public void TestWithBasicInfo()
+ // <summary>Closes the test connection.</summary>
+ private void Stop()
{
- Console.WriteLine("TestWithBasicInfo");
+ _log.Debug("Stopping...");
try
{
- QpidConnectionInfo connectionInfo = new QpidConnectionInfo();
- connectionInfo.AddBrokerInfo(new AmqBrokerInfo("amqp", "localhost", 5672, false));
- connectionInfo.AddBrokerInfo(new AmqBrokerInfo("amqp", "localhost", 5673, false));
- DoFailoverTest(connectionInfo);
- while (true)
- {
- Thread.Sleep(5000);
- }
+ _connection.Close();
}
- catch (Exception e)
+ catch (QpidException e)
{
- _logger.Error("Exception caught", e);
+ _log.Debug("Failed to shutdown: ", e);
}
- }*/
+ }
+
+ /// <summary>
+ /// Called when bytes have been transmitted to the server
+ /// </summary>
+ ///
+ /// <param>count the number of bytes sent in total since the connection was opened</param>
+ public void BytesSent(long count) {}
+
+ /// <summary>
+ /// Called when some bytes have been received on a connection
+ /// </summary>
+ ///
+ /// <param>count the number of bytes received in total since the connection was opened</param>
+ public void BytesReceived(long count) {}
+
+ /// <summary>
+ /// Called after the infrastructure has detected that failover is required but before attempting failover.
+ /// </summary>
+ ///
+ /// <param>redirect true if the broker requested redirect. false if failover is occurring due to a connection error.</param>
+ ///
+ /// <return>true to continue failing over, false to veto failover and raise a connection exception</return>
+ public bool PreFailover(bool redirect)
+ {
+ _log.Debug("public bool PreFailover(bool redirect): called");
+ return true;
+ }
-// [Test]
-// public void TestWithUrl()
-// {
-// String clientId = "failover" + DateTime.Now.Ticks;
-// String defaultUrl = "amqp://guest:guest@" + clientId + "/test" +
-// "?brokerlist='tcp://localhost:5672;tcp://localhost:5673'&failover='roundrobin'";
-//
-// _logger.Info("url = [" + defaultUrl + "]");
-//
-// // _logger.Info("connection url = [" + new AMQConnectionURL(defaultUrl) + "]");
-//
-// String broker = defaultUrl;
-// //new FailoverTest(broker);
-// }
+ /// <summary>
+ /// Called after connection has been made to another broker after failover has been started but before
+ /// any resubscription has been done.
+ /// </summary>
+ ///
+ /// <return> true to continue with resubscription, false to prevent automatic resubscription. This is useful in
+ /// cases where the application wants to handle resubscription. Note that in the latter case all sessions, producers
+ /// and consumers are invalidated.
+ /// </return>
+ public bool PreResubscribe()
+ {
+ _log.Debug("public bool PreResubscribe(): called");
+ return true;
+ }
+
+ /// <summary>
+ /// Called once failover has completed successfully. This is called irrespective of whether the client has
+ /// vetoed automatic resubscription.
+ /// </summary>
+ public void FailoverComplete()
+ {
+ _log.Debug("public void FailoverComplete(): called");
+ }
}
}
diff --git a/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs b/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs
deleted file mode 100644
index a110891cfc..0000000000
--- a/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Runtime.InteropServices;
-using System.Threading;
-using log4net;
-using NUnit.Framework;
-using Apache.Qpid.Client.Qms;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Client.Tests.failover
-{
- [TestFixture, Category("Failover")]
- public class FailoverTxTest : IConnectionListener
- {
- private static readonly ILog _log = LogManager.GetLogger(typeof(FailoverTxTest));
-
- const int NUM_ITERATIONS = 10;
- const int NUM_COMMITED_MESSAGES = 10;
- const int NUM_ROLLEDBACK_MESSAGES = 3;
- const int SLEEP_MILLIS = 50;
-
- // AutoAcknowledge, ClientAcknowledge, DupsOkAcknowledge, NoAcknowledge, PreAcknowledge
- AcknowledgeMode _acknowledgeMode = AcknowledgeMode.DupsOkAcknowledge;
- const bool _noWait = true; // use Receive or ReceiveNoWait
- AMQConnection _connection;
-
- public void OnMessage(IMessage message)
- {
- try
- {
- _log.Info("Received: " + ((ITextMessage) message).Text);
- if (_acknowledgeMode == AcknowledgeMode.ClientAcknowledge)
- {
- _log.Info("client acknowledging");
- message.Acknowledge();
- }
- }
- catch (QpidException e)
- {
- Error(e);
- }
- }
-
- class NoWaitConsumer
- {
- FailoverTxTest _failoverTxTest;
- IMessageConsumer _consumer;
- private bool _noWait;
-
- internal NoWaitConsumer(FailoverTxTest failoverTxTest, IMessageConsumer channel, bool noWait)
- {
- _failoverTxTest = failoverTxTest;
- _consumer = channel;
- _noWait = noWait;
- }
-
- internal void Run()
- {
- int messages = 0;
- while (messages < NUM_COMMITED_MESSAGES)
- {
- IMessage msg;
- if (_noWait) msg = _consumer.ReceiveNoWait();
- else msg = _consumer.Receive();
- if (msg != null)
- {
- _log.Info("NoWait received message");
- ++messages;
- _failoverTxTest.OnMessage(msg);
- }
- else
- {
- Thread.Sleep(1);
- }
-
- }
-
- }
- }
-
- void DoFailoverTxTest(IConnectionInfo connectionInfo)
- {
- _connection = new AMQConnection(connectionInfo);
- _connection.ConnectionListener = this;
- _log.Info("connection = " + _connection);
- _log.Info("connectionInfo = " + connectionInfo);
- _log.Info("connection.AsUrl = " + _connection.toURL());
-
- _log.Info("AcknowledgeMode is " + _acknowledgeMode);
- IChannel receivingChannel = _connection.CreateChannel(false, _acknowledgeMode);
-
- string queueName = receivingChannel.GenerateUniqueName();
-
- // Queue.Declare
- receivingChannel.DeclareQueue(queueName, false, true, true);
-
- // No need to call Queue.Bind as automatically bound to default direct exchange.
- receivingChannel.Bind(queueName, "amq.direct", queueName);
-
- IMessageConsumer consumer = receivingChannel.CreateConsumerBuilder(queueName)
- .WithPrefetchLow(30)
- .WithPrefetchHigh(60).Create();
- bool useThread = false;
- if (useThread)
- {
- NoWaitConsumer noWaitConsumer = new NoWaitConsumer(this, consumer, _noWait);
- new Thread(new ThreadStart(noWaitConsumer.Run)).Start();
- }
- else
- {
- consumer.OnMessage = new MessageReceivedDelegate(OnMessage);
- }
-
- _connection.Start();
-
- PublishInTx(queueName);
-
- Thread.Sleep(2000); // Wait a while for last messages.
-
- _connection.Close();
- _log.Info("FailoverTxText complete");
- }
-
- private void PublishInTx(string routingKey)
- {
- _log.Info("sendInTx");
- bool transacted = true;
- IChannel publishingChannel = _connection.CreateChannel(transacted, AcknowledgeMode.NoAcknowledge);
- IMessagePublisher publisher = publishingChannel.CreatePublisherBuilder()
- .WithRoutingKey(routingKey)
- .Create();
-
- for (int i = 1; i <= NUM_ITERATIONS; ++i)
- {
- for (int j = 1; j <= NUM_ROLLEDBACK_MESSAGES; ++j)
- {
- ITextMessage msg = publishingChannel.CreateTextMessage("Tx=" + i + " rolledBackMsg=" + j);
- _log.Info("sending message = " + msg.Text);
- publisher.Send(msg);
- Thread.Sleep(SLEEP_MILLIS);
- }
- if (transacted) publishingChannel.Rollback();
-
- for (int j = 1; j <= NUM_COMMITED_MESSAGES; ++j)
- {
- ITextMessage msg = publishingChannel.CreateTextMessage("Tx=" + i + " commitedMsg=" + j);
- _log.Info("sending message = " + msg.Text);
- publisher.Send(msg);
- Thread.Sleep(SLEEP_MILLIS);
- }
- if (transacted) publishingChannel.Commit();
- }
- }
-
- private void Error(Exception e)
- {
- _log.Fatal("Exception received. About to stop.", e);
- Stop();
- }
-
- private void Stop()
- {
- _log.Info("Stopping...");
- try
- {
- _connection.Close();
- }
- catch (QpidException e)
- {
- _log.Info("Failed to shutdown: ", e);
- }
- }
-
- public void BytesSent(long count)
- {
- }
-
- public void BytesReceived(long count)
- {
- }
-
- public bool PreFailover(bool redirect)
- {
- _log.Info("preFailover(" + redirect + ") called");
- return true;
- }
-
- public bool PreResubscribe()
- {
- _log.Info("preResubscribe() called");
- return true;
- }
-
- public void FailoverComplete()
- {
- _log.Info("failoverComplete() called");
- }
-
- [Test]
- public void TestFail()
- {
- Assert.Fail("Tests in this class do not pass, but hang forever, so commented out until can be fixed.");
- }
-
- /*[Test]
- public void TestWithBasicInfo()
- {
- Console.WriteLine("TestWithBasicInfo");
- Console.WriteLine(".NET Framework version: " + RuntimeEnvironment.GetSystemVersion());
- QpidConnectionInfo connectionInfo = new QpidConnectionInfo();
-
- connectionInfo.AddBrokerInfo(new AmqBrokerInfo("amqp", "localhost", 5672, false));
- connectionInfo.AddBrokerInfo(new AmqBrokerInfo("amqp", "localhost", 5673, false));
-
- DoFailoverTxTest(connectionInfo);
- }*/
-
- /*[Test]
- public void runTestWithUrl()
- {
- String clientId = "failover" + DateTime.Now.Ticks;
- string defaultUrl = "amqp://guest:guest@" + clientId + "/test" +
- "?brokerlist='tcp://localhost:5672;tcp://localhost:5673'&failover='roundrobin'";
-
- _log.Info("url = [" + defaultUrl + "]");
-
- IConnectionInfo connectionInfo = QpidConnectionInfo.FromUrl(defaultUrl);
-
- _log.Info("connection url = [" + connectionInfo + "]");
-
- DoFailoverTxTest(connectionInfo);
- }*/
- }
-}
diff --git a/dotnet/Qpid.Client.Tests/log4net.config b/dotnet/Qpid.Client.Tests/log4net.config
index 4346e0eaeb..8753c9c431 100644
--- a/dotnet/Qpid.Client.Tests/log4net.config
+++ b/dotnet/Qpid.Client.Tests/log4net.config
@@ -1,62 +1,48 @@
<log4net>
- <appender name="console" type="log4net.Appender.ConsoleAppender" >
- <layout type="log4net.Layout.PatternLayout">
- <conversionPattern value="%d [%t] %-5p %c:%M(%L) - %m%n" />
- </layout>
- <threshold value="info"/>
- </appender>
-
- <appender name="filelog" type="log4net.Appender.FileAppender">
- <file value="qpid_client.log"/>
- <appendToFile value="false"/>
- <layout type="log4net.Layout.PatternLayout">
- <conversionPattern value="%d [%t] %-5p %c:%M(%L) - %m%n" />
- </layout>
- </appender>
-
- <appender name="protocolLog" type="log4net.Appender.FileAppender">
- <file value="protocol.log"/>
- <appendToFile value="false"/>
- <layout type="log4net.Layout.PatternLayout">
- <conversionPattern value="%date - %message%newline"/>
- </layout>
- </appender>
-
- <appender name="ioLog" type="log4net.Appender.FileAppender">
- <file value="io.log"/>
- <appendToFile value="false"/>
- <layout type="log4net.Layout.PatternLayout">
- <conversionPattern value="%date - %message%newline"/>
- </layout>
- <threshold value="info"/>
- </appender>
-
- <appender name="UdpAppender" type="log4net.Appender.UdpAppender">
- <remoteAddress value="127.0.0.1" />
- <remotePort value="4445" />
- <layout type="log4net.Layout.XmlLayoutSchemaLog4j">
- <locationInfo value="true" />
- </layout>
- <threshold value="debug"/>
- </appender>
-
- <logger name="Qpid.Client.ProtocolChannel.Tracing" additivity="false">
- <level value="info"/>
- <appender-ref ref="protocolLog"/>
- </logger>
-
- <logger name="Qpid.Client.ByteChannel.Tracing" additivity="false">
- <level value="info" />
- <appender-ref ref="ioLog"/>
- </logger>
- <logger name="Qpid.Framing.FieldTable" additivity="false">
- <level value="debug" />
- <appender-ref ref="console"/>
- </logger>
-
- <root>
- <appender-ref ref="console"/>
- <appender-ref ref="UdpAppender"/>
- <appender-ref ref="filelog"/>
- </root>
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="console" type="log4net.Appender.ConsoleAppender" >
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%m%n"/>
+ </layout>
+ <threshold value="info"/>
+ </appender>
+
+ <!-- ====================================== -->
+ <!-- Append messages to the socket appender -->
+ <!-- ====================================== -->
+
+ <appender name="UdpAppender" type="log4net.Appender.UdpAppender">
+ <remoteAddress value="127.0.0.1"/>
+ <remotePort value="4445"/>
+ <layout type="log4net.Layout.XmlLayoutSchemaLog4j">
+ <locationInfo value="true"/>
+ </layout>
+ <threshold value="debug"/>
+ </appender>
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <logger name="Qpid">
+ <level value="debug"/>
+ </logger>
+
+ <logger name="CONSOLE">
+ <level value="info"/>
+ <appender-ref ref="console"/>
+ </logger>
+
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <appender-ref ref="UdpAppender"/>
+ </root>
+
</log4net> \ No newline at end of file
diff --git a/dotnet/Qpid.Client/Client/Protocol/AMQProtocolListener.cs b/dotnet/Qpid.Client/Client/Protocol/AMQProtocolListener.cs
index 326afbe613..c51538b70e 100644
--- a/dotnet/Qpid.Client/Client/Protocol/AMQProtocolListener.cs
+++ b/dotnet/Qpid.Client/Client/Protocol/AMQProtocolListener.cs
@@ -29,21 +29,40 @@ using Apache.Qpid.Framing;
namespace Apache.Qpid.Client.Protocol
{
+ /// <summary>
+ /// AMQProtocolListener
+ ///
+ /// <p/>Fail-over state transition rules...
+ ///
+ /// <p/>The failover handler is created when the session is created since it needs a reference to the IoSession in order
+ /// to be able to send errors during failover back to the client application. The session won't be available in the case
+ /// when failing over due to a Connection.Redirect message from the broker.
+ ///
+ /// <p><table id="crc"><caption>CRC Card</caption>
+ /// <tr><th> Responsibilities <th> Collaborations
+ /// <tr><td> Track fail over state of a connection.
+ /// <tr><td> Manage method listeners. <td> IAMQMethodListener
+ /// <tr><td> Receive notification of all IO errors on a connection. <td> IoHandler
+ /// <tr><td> Inform method listeners of all method events on a connection. <td> IAMQMethodListener
+ /// <tr><td> Inform method listeners of all error events on a connection. <td> IAMQMethodListener
+ /// </table>
+ ///
+ /// <b>Todo:</b> The broker will close the connection with no warning if authentication fails. This may result in the fail-over process being
+ /// triggered, when it should not be.
+ ///
+ /// </summary>
public class AMQProtocolListener : IProtocolListener
{
+ /// <summary>Used for debugging.</summary>
private static readonly ILog _log = LogManager.GetLogger(typeof(AMQProtocolListener));
- /**
- * We create the failover handler when the session is created since it needs a reference to the IoSession in order
- * to be able to send errors during failover back to the client application. The session won't be available in the
- * case where we failing over due to a Connection.Redirect message from the broker.
- */
+ /// <summary>
+ /// Holds the failover handler for the connection. When a failure is detected, and the current failover state allows it,
+ /// the failover process is handed off to this handler.
+ /// </summary>
private FailoverHandler _failoverHandler;
- /**
- * This flag is used to track whether failover is being attempted. It is used to prevent the application constantly
- * attempting failover where it is failing.
- */
+ /// <summary>Tracks the current fail-over state.</summary>
internal FailoverState _failoverState = FailoverState.NOT_STARTED;
internal FailoverState FailoverState
@@ -63,15 +82,14 @@ namespace Apache.Qpid.Client.Protocol
set { _stateManager = value; }
}
- //private readonly CopyOnWriteArraySet _frameListeners = new CopyOnWriteArraySet();
private readonly ArrayList _frameListeners = ArrayList.Synchronized(new ArrayList());
- AMQProtocolSession _protocolSession = null; // FIXME
- public AMQProtocolSession ProtocolSession { set { _protocolSession = value; } } // FIXME: can this be fixed?
-
+ AMQProtocolSession _protocolSession = null;
private readonly Object _lock = new Object();
+ public AMQProtocolSession ProtocolSession { set { _protocolSession = value; } }
+
public AMQProtocolListener(AMQConnection connection, AMQStateManager stateManager)
{
_connection = connection;
@@ -138,88 +156,91 @@ namespace Apache.Qpid.Client.Protocol
{
_log.Debug("HeartBeat received");
}
- //_connection.BytesReceived(_protocolSession.Channel.ReadBytes); // XXX: is this really useful?
}
+ /// <summary>
+ /// Receives notification of any IO exceptions on the connection.
+ ///
+ /// <p/>Upon receipt of a connection closed exception or any IOException, the fail-over process is attempted. If the fail-over fails, then
+ /// all method listeners and the application connection object are notified of the connection failure exception.
+ ///
+ /// <p/>All other exception types are propagated to all method listeners.
+ /// </summary>
public void OnException(Exception cause)
{
- _log.Warn("Protocol Listener received exception", cause);
+ _log.Warn("public void OnException(Exception cause = " + cause + "): called");
+
+ // Ensure that the method listener set cannot be changed whilst this exception is propagated to all listeners. This also
+ // ensures that this exception is fully propagated to all listeners, before another one can be processed.
lock (_lock)
{
- if (_failoverState == FailoverState.NOT_STARTED)
+ if (cause is AMQConnectionClosedException || cause is System.IO.IOException)
{
- if (cause is AMQConnectionClosedException)
+ // Try a fail-over because the connection has failed.
+ FailoverState failoverState = AttemptFailover();
+
+ // Check if the fail-over has failed, in which case notify all method listeners of the exception.
+ // The application connection object is also notified of the failure of the connection with the exception.
+ if (failoverState == FailoverState.FAILED)
{
- WhenClosed();
+ _log.Debug("Fail-over has failed. Notifying all method listeners of the exception.");
+
+ AMQException amqe = new AMQException("Protocol handler error: " + cause, cause);
+ PropagateExceptionToWaiters(amqe);
+ _connection.ExceptionReceived(cause);
}
}
- // We reach this point if failover was attempted and failed therefore we need to let the calling app
- // know since we cannot recover the situation.
- else if (_failoverState == FailoverState.FAILED)
+ // Notify all method listeners of the exception.
+ else
{
- // we notify the state manager of the error in case we have any clients waiting on a state
- // change. Those "waiters" will be interrupted and can handle the exception
- AMQException amqe = new AMQException("Protocol handler error: " + cause, cause);
- PropagateExceptionToWaiters(amqe);
+ PropagateExceptionToWaiters(cause);
_connection.ExceptionReceived(cause);
}
}
}
- /**
- * When the broker connection dies we can either get sessionClosed() called or exceptionCaught() followed by
- * sessionClosed() depending on whether we were trying to send data at the time of failure.
- *
- * @param session
- * @throws Exception
- */
- void WhenClosed()
+ /// <summary>
+ /// Tries to fail-over the connection, if the connection policy will permit it, and the fail-over process has not yet been
+ /// started. If the connection does not allow fail-over then an exception will be raised. If a fail-over is already in progress
+ /// this method allows it to continue to run and will do nothing.
+ ///
+ /// <p/>This method should only be called when the connection has been remotely closed.
+ /// </summary>
+ ///
+ /// <returns>The fail-over state at the end of this attempt.</returns>
+ private FailoverState AttemptFailover()
{
+ _log.Debug("private void AttemptFailover(): called");
+ _log.Debug("_failoverState = " + _failoverState);
+
+ // Ensure that the connection stops sending heart beats, if it still is.
_connection.StopHeartBeatThread();
- // TODO: Server just closes session with no warning if auth fails.
- if (_connection.Closed)
+ // Check that the connection policy allows fail-over to be attempted.
+ if (!_connection.IsFailoverAllowed)
{
- _log.Info("Channel closed called by client");
+ _log.Debug("Connection does not allowed to failover");
+ _connection.ExceptionReceived(
+ new AMQDisconnectedException("Broker closed connection and reconnection is not permitted."));
}
- else
- {
- _log.Info("Channel closed called with failover state currently " + _failoverState);
- // Reconnectablility was introduced here so as not to disturb the client as they have made their intentions
- // known through the policy settings.
+ // Check if connection was closed deliberately by the application, in which case no fail-over is attempted.
+ if (_connection.Closed)
+ {
+ return _failoverState;
+ }
- if ((_failoverState != FailoverState.IN_PROGRESS) && _connection.IsFailoverAllowed)
- {
- _log.Info("FAILOVER STARTING");
- if (_failoverState == FailoverState.NOT_STARTED)
- {
- _failoverState = FailoverState.IN_PROGRESS;
- StartFailoverThread();
- }
- else
- {
- _log.Info("Not starting failover as state currently " + _failoverState);
- }
- }
- else
- {
- _log.Info("Failover not allowed by policy.");
+ // If the connection allows fail-over and fail-over has not yet been started, then it is started and the fail-over state is
+ // advanced to 'in progress'
+ if (_failoverState == FailoverState.NOT_STARTED && _connection.IsFailoverAllowed)
+ {
+ _log.Info("Starting the fail-over process.");
- if (_failoverState != FailoverState.IN_PROGRESS)
- {
- _log.Info("sessionClose() not allowed to failover");
- _connection.ExceptionReceived(
- new AMQDisconnectedException("Server closed connection and reconnection not permitted."));
- }
- else
- {
- _log.Info("sessionClose() failover in progress");
- }
- }
+ _failoverState = FailoverState.IN_PROGRESS;
+ StartFailoverThread();
}
- _log.Info("Protocol Channel [" + this + "] closed");
+ return _failoverState;
}
/// <summary>
diff --git a/dotnet/Qpid.Client/Client/Transport/IoHandler.cs b/dotnet/Qpid.Client/Client/Transport/IoHandler.cs
index 556f9631b3..9ac513069e 100644
--- a/dotnet/Qpid.Client/Client/Transport/IoHandler.cs
+++ b/dotnet/Qpid.Client/Client/Transport/IoHandler.cs
@@ -143,9 +143,10 @@ namespace Apache.Qpid.Client.Transport
try
{
_topStream.Write(buffer.Array, buffer.Position, buffer.Limit); // FIXME
- } catch ( Exception e )
+ }
+ catch (Exception e)
{
- _log.Error("Write caused exception", e);
+ _log.Warn("Write caused exception", e);
_protocolListener.OnException(e);
}
}
diff --git a/dotnet/Qpid.Client/qms/FailoverPolicy.cs b/dotnet/Qpid.Client/qms/FailoverPolicy.cs
index d5d1e8d8ac..179a695bf9 100644
--- a/dotnet/Qpid.Client/qms/FailoverPolicy.cs
+++ b/dotnet/Qpid.Client/qms/FailoverPolicy.cs
@@ -46,7 +46,7 @@ namespace Apache.Qpid.Client.Qms
private long _lastMethodTime;
private long _lastFailTime;
-
+
public FailoverPolicy(IConnectionInfo connectionInfo)
{
IFailoverMethod method;
diff --git a/dotnet/Qpid.Common/AMQConnectionClosedException.cs b/dotnet/Qpid.Common/AMQConnectionClosedException.cs
index f3bc387a5c..136131144b 100644
--- a/dotnet/Qpid.Common/AMQConnectionClosedException.cs
+++ b/dotnet/Qpid.Common/AMQConnectionClosedException.cs
@@ -24,6 +24,17 @@ using System.Runtime.Serialization;
namespace Apache.Qpid
{
+ /// <summary>
+ /// AMQConnectionClosedException indicates that a connection has been closed.
+ ///
+ /// <p/>This exception is really used as an event, in order that the method handler that raises it creates an event
+ /// which is propagated to the io handler, in order to notify it of the connection closure.
+ ///
+ /// <p/><table id="crc"><caption>CRC Card</caption>
+ /// <tr><th> Responsibilities <th> Collaborations
+ /// <tr><td> Represents a the closure of a connection.
+ /// </table>
+ /// </summary>
[Serializable]
public class AMQConnectionClosedException : AMQException
{
@@ -33,7 +44,7 @@ namespace Apache.Qpid
}
protected AMQConnectionClosedException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
+ : base(info, ctxt)
{
}
}
diff --git a/dotnet/RELEASE_NOTES.txt b/dotnet/RELEASE_NOTES.txt
index 6b1295b03c..97e8a6f3b8 100644
--- a/dotnet/RELEASE_NOTES.txt
+++ b/dotnet/RELEASE_NOTES.txt
@@ -27,7 +27,6 @@ M2 Tasks Completed
The set of JIRA tasks completed as part of the M2 effort is available at:
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310520&styleName=Html&version=12312116
-
Here is a filtered list of JIRA items for the .NET Client
Test QPID-435 HeadersExchangeTest fails
diff --git a/java/broker/etc/log4j.xml b/java/broker/etc/log4j.xml
index 2060246b7f..af8e7a8293 100644
--- a/java/broker/etc/log4j.xml
+++ b/java/broker/etc/log4j.xml
@@ -76,6 +76,7 @@
<category name="Qpid.Broker">
<priority value="debug"/>
<appender-ref ref="AlertFile"/>
+ <appender-ref ref="STDOUT"/>
</category>
<category name="org.apache.qpid.server.queue.AMQQueueMBean">
diff --git a/java/broker/pom.xml b/java/broker/pom.xml
index b1dbded542..4901f1d8ad 100644
--- a/java/broker/pom.xml
+++ b/java/broker/pom.xml
@@ -204,18 +204,12 @@
<configuration>
<tasks>
- <condition property="broker.dir"
- else="${user.dir}${file.separator}broker"
- value="${user.dir}">
- <contains string="${user.dir}" substring="broker" />
- </condition>
-
<condition property="skip-python-tests" value="true">
<isset property="skip.python.tests"/>
</condition>
<property name="command"
- value="python run-tests -v -I java_failing.txt"/>
+ value="python run-tests -v -I java_failing.txt -b localhost:2000"/>
<!--value="bash -c 'python run-tests -v -I java_failing.txt'"/>-->
<ant antfile="python-test.xml" inheritRefs="true">
diff --git a/java/broker/python-test.xml b/java/broker/python-test.xml
index a31dae0060..e044207948 100755
--- a/java/broker/python-test.xml
+++ b/java/broker/python-test.xml
@@ -1,50 +1,56 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<!-- ====================================================================== -->
-<!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above. -->
-<!-- ====================================================================== -->
-
-<project basedir="." default="default">
-
- <target name="default" >
- <echo message="Used via maven to run python tests."/>
- </target>
-
- <property name="pythondir" value="../../python"/>
-
- <target name="run-tests" unless="skip-python-tests">
-
- <echo message="Starting Broker with command"/>
-
- <java classname="org.apache.qpid.server.RunBrokerWithCommand"
- fork="true"
- dir="${pythondir}"
- failonerror="true"
- >
- <arg value="${command}"/>
-
- <classpath refid="maven.test.classpath"/>
- <sysproperty key="QPID_HOME" value="${broker.dir}"/>
- <sysproperty key="QPID_WORK" value="${broker.dir}${file.separator}target"/>
- </java>
-
- </target>
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!-- ====================================================================== -->
+<!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above. -->
+<!-- ====================================================================== -->
+
+<project basedir="." default="default">
+
+ <target name="default" >
+ <echo message="Used via maven to run python tests."/>
+ </target>
+
+ <dirname property="broker.dir" file="${ant.file.python-test}"/>
+
+ <property name="pythondir" value="${broker.dir}/../../python"/>
+
+ <target name="run-tests" unless="skip-python-tests">
+
+ <echo message="Starting Broker with command"/>
+
+ <java classname="org.apache.qpid.server.RunBrokerWithCommand"
+ fork="true"
+ dir="${pythondir}"
+ failonerror="true"
+ >
+ <arg value="${command}"/>
+ <arg value="-p"/>
+ <arg value="2000"/>
+ <arg value="-m"/>
+ <arg value="2001"/>
+
+ <classpath refid="maven.test.classpath"/>
+ <sysproperty key="QPID_HOME" value="${broker.dir}"/>
+ <sysproperty key="QPID_WORK" value="${broker.dir}${file.separator}target"/>
+ </java>
+
+ </target>
+</project>
diff --git a/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java b/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java
index f19b6823b8..d3b459c48a 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java
@@ -943,6 +943,8 @@ public class AMQChannel
AMQMessage message = bouncedMessage.getAMQMessage();
session.getProtocolOutputConverter().writeReturn(message, _channelId, bouncedMessage.getReplyCode().getCode(),
new AMQShortString(bouncedMessage.getMessage()));
+
+ message.decrementReference(_storeContext);
}
_returnMessages.clear();
diff --git a/java/broker/src/main/java/org/apache/qpid/server/ack/UnacknowledgedMessage.java b/java/broker/src/main/java/org/apache/qpid/server/ack/UnacknowledgedMessage.java
index b8c5e821f7..7088c704ed 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/ack/UnacknowledgedMessage.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/ack/UnacknowledgedMessage.java
@@ -60,7 +60,7 @@ public class UnacknowledgedMessage
{
if (queue != null)
{
- message.dequeue(storeContext, queue);
+ queue.dequeue(storeContext, message);
}
//if the queue is null then the message is waiting to be acked, but has been removed.
message.decrementReference(storeContext);
diff --git a/java/broker/src/main/java/org/apache/qpid/server/handler/BasicRejectMethodHandler.java b/java/broker/src/main/java/org/apache/qpid/server/handler/BasicRejectMethodHandler.java
index 9052b2e81f..aca485f62a 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/handler/BasicRejectMethodHandler.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/handler/BasicRejectMethodHandler.java
@@ -23,7 +23,6 @@ package org.apache.qpid.server.handler;
import org.apache.qpid.AMQException;
import org.apache.qpid.framing.BasicRejectBody;
import org.apache.qpid.protocol.AMQMethodEvent;
-import org.apache.qpid.protocol.AMQConstant;
import org.apache.qpid.server.AMQChannel;
import org.apache.qpid.server.ack.UnacknowledgedMessage;
import org.apache.qpid.server.protocol.AMQProtocolSession;
@@ -71,7 +70,7 @@ public class BasicRejectMethodHandler implements StateAwareMethodListener<BasicR
{
_logger.debug("Rejecting:" + evt.getMethod().deliveryTag +
": Requeue:" + evt.getMethod().requeue +
-// ": Resend:" + evt.getMethod().resend +
+ //": Resend:" + evt.getMethod().resend +
" on channel:" + channel.debugIdentity());
}
@@ -86,17 +85,31 @@ public class BasicRejectMethodHandler implements StateAwareMethodListener<BasicR
}
else
{
+ if (message.queue == null || message.queue.isDeleted())
+ {
+ _logger.warn("Message's Queue as already been purged, unable to Reject. " +
+ "Dropping message should use Dead Letter Queue");
+ //sendtoDeadLetterQueue(msg)
+ return;
+ }
+
+ if (!message.message.isReferenced())
+ {
+ _logger.warn("Message as already been purged, unable to Reject.");
+ return;
+ }
+
if (_logger.isTraceEnabled())
{
_logger.trace("Rejecting: DT:" + deliveryTag + "-" + message.message.debugIdentity() +
": Requeue:" + evt.getMethod().requeue +
-// ": Resend:" + evt.getMethod().resend +
+ //": Resend:" + evt.getMethod().resend +
" on channel:" + channel.debugIdentity());
}
// If we haven't requested message to be resent to this consumer then reject it from ever getting it.
-// if (!evt.getMethod().resend)
+ //if (!evt.getMethod().resend)
{
message.message.reject(message.message.getDeliveredSubscription(message.queue));
}
@@ -108,6 +121,7 @@ public class BasicRejectMethodHandler implements StateAwareMethodListener<BasicR
else
{
_logger.warn("Dropping message as requeue not required and there is no dead letter queue");
+ //sendtoDeadLetterQueue(AMQMessage message)
// message.queue = channel.getDefaultDeadLetterQueue();
// channel.requeue(deliveryTag);
}
diff --git a/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java b/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java
index 2bc185cfb4..29697542be 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java
@@ -22,6 +22,7 @@ package org.apache.qpid.server.handler;
import java.text.MessageFormat;
import java.util.concurrent.atomic.AtomicInteger;
+import java.util.UUID;
import org.apache.log4j.Logger;
import org.apache.qpid.AMQException;
@@ -158,12 +159,7 @@ public class QueueDeclareHandler implements StateAwareMethodListener<QueueDeclar
protected AMQShortString createName()
{
- return new AMQShortString("tmp_" + pad(_counter.incrementAndGet()));
- }
-
- protected static String pad(int value)
- {
- return MessageFormat.format("{0,number,0000000000000}", value);
+ return new AMQShortString("tmp_" + UUID.randomUUID());
}
protected AMQQueue createQueue(QueueDeclareBody body, VirtualHost virtualHost, final AMQProtocolSession session)
diff --git a/java/broker/src/main/java/org/apache/qpid/server/queue/AMQMessage.java b/java/broker/src/main/java/org/apache/qpid/server/queue/AMQMessage.java
index afa581f0c5..dd9f32a306 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/queue/AMQMessage.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/queue/AMQMessage.java
@@ -130,6 +130,11 @@ public class AMQMessage
}
+ public boolean isReferenced()
+ {
+ return _referenceCount.get() > 0;
+ }
+
/**
* Used to iterate through all the body frames associated with this message. Will not keep all the data in memory
* therefore is memory-efficient.
@@ -553,6 +558,7 @@ public class AMQMessage
taken.set(false);
}
+ _deliveredToConsumer = false;
_takenMap.put(queue, taken);
_takenBySubcriptionMap.put(queue, null);
}
@@ -592,7 +598,19 @@ public class AMQMessage
_transientMessageData.addDestinationQueue(queue);
}
- public void dequeue(StoreContext storeContext, AMQQueue queue) throws AMQException
+ /**
+ * NOTE: Think about why you are using this method. Normal usages would want to do
+ * AMQQueue.dequeue(StoreContext, AMQMessage)
+ * This will keep the queue statistics up-to-date.
+ * Currently this method is only called _correctly_ from AMQQueue dequeue.
+ * Ideally we would have a better way for the queue to dequeue the message.
+ * Especially since enqueue isn't the recipriocal of this method.
+ * @deprecated
+ * @param storeContext
+ * @param queue
+ * @throws AMQException
+ */
+ void dequeue(StoreContext storeContext, AMQQueue queue) throws AMQException
{
_messageHandle.dequeue(storeContext, _messageId, queue);
}
@@ -677,7 +695,10 @@ public class AMQMessage
return false;
}
- /** Called when this message is delivered to a consumer. (used to implement the 'immediate' flag functionality). */
+ /**
+ * Called when this message is delivered to a consumer. (used to implement the 'immediate' flag functionality).
+ * And for selector efficiency.
+ */
public void setDeliveredToConsumer()
{
_deliveredToConsumer = true;
diff --git a/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java b/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
index faa5d4a5c5..0c52a358f7 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
@@ -238,6 +238,11 @@ public class AMQQueue implements Managable, Comparable
return _autoDelete;
}
+ public boolean isDeleted()
+ {
+ return _deleted.get();
+ }
+
/** @return no of messages(undelivered) on the queue. */
public int getMessageCount()
{
@@ -581,7 +586,7 @@ public class AMQQueue implements Managable, Comparable
/** Removes the AMQMessage from the top of the queue. */
public synchronized void deleteMessageFromTop(StoreContext storeContext) throws AMQException
{
- _deliveryMgr.removeAMessageFromTop(storeContext);
+ _deliveryMgr.removeAMessageFromTop(storeContext, this);
}
/** removes all the messages from the queue. */
@@ -809,7 +814,7 @@ public class AMQQueue implements Managable, Comparable
}
}
- void dequeue(StoreContext storeContext, AMQMessage msg) throws FailedDequeueException
+ public void dequeue(StoreContext storeContext, AMQMessage msg) throws FailedDequeueException
{
try
{
diff --git a/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java b/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java
index 907d68b733..eabc8ebf38 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java
@@ -211,6 +211,12 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager
}
}
+ /** @return the state of the async processor. */
+ public boolean isProcessingAsync()
+ {
+ return _processing.get();
+ }
+
/**
* Returns all the messages in the Queue
*
@@ -281,9 +287,12 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager
while (currentQueue.hasNext())
{
AMQMessage message = currentQueue.next();
- if (subscription.hasInterest(message))
+ if (!message.getDeliveredToConsumer())
{
- subscription.enqueueForPreDelivery(message, false);
+ if (subscription.hasInterest(message))
+ {
+ subscription.enqueueForPreDelivery(message, false);
+ }
}
}
}
@@ -330,6 +339,11 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager
deliveryTag, _queue.getMessageCount());
_totalMessageSize.addAndGet(-msg.getSize());
}
+
+ if (!acks)
+ {
+ msg.decrementReference(channel.getStoreContext());
+ }
}
finally
{
@@ -402,14 +416,21 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager
*
* @throws AMQException
*/
- public void removeAMessageFromTop(StoreContext storeContext) throws AMQException
+ public void removeAMessageFromTop(StoreContext storeContext, AMQQueue queue) throws AMQException
{
_lock.lock();
AMQMessage message = _messages.poll();
+
if (message != null)
{
+ queue.dequeue(storeContext, message);
+
_totalMessageSize.addAndGet(-message.getSize());
+
+ //If this causes ref count to hit zero then data will be purged so message.getSize() will NPE.
+ message.decrementReference(storeContext);
+
}
_lock.unlock();
@@ -429,6 +450,9 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager
_messages.poll();
_queue.dequeue(storeContext, msg);
+
+ msg.decrementReference(_reapingStoreContext);
+
msg = getNextMessage();
count++;
}
@@ -447,15 +471,15 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager
*/
private AMQMessage getNextMessage() throws AMQException
{
- return getNextMessage(_messages, null);
+ return getNextMessage(_messages, null, false);
}
- private AMQMessage getNextMessage(Queue<AMQMessage> messages, Subscription sub) throws AMQException
+ private AMQMessage getNextMessage(Queue<AMQMessage> messages, Subscription sub, boolean purgeOnly) throws AMQException
{
AMQMessage message = messages.peek();
//while (we have a message) && ((The subscriber is not a browser or message is taken ) or we are clearing) && (Check message is taken.)
- while (purgeMessage(message, sub))
+ while (purgeMessage(message, sub, purgeOnly))
{
// if we are purging then ensure we mark this message taken for the current subscriber
// the current subscriber may be null in the case of a get or a purge but this is ok.
@@ -467,12 +491,14 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager
assert removed == message;
// if the message expired then the _totalMessageSize needs adjusting
- if (message.expired(_queue))
+ if (message.expired(_queue) && !message.getDeliveredToConsumer())
{
_totalMessageSize.addAndGet(-message.getSize());
// Use the reapingStoreContext as any sub(if we have one) may be in a tx.
- message.dequeue(_reapingStoreContext, _queue);
+ _queue.dequeue(_reapingStoreContext, message);
+
+ message.decrementReference(_reapingStoreContext);
if (_log.isInfoEnabled())
{
@@ -496,17 +522,38 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager
}
/**
- * This method will return true if the message is to be purged from the queue.
+ * This method will return true if the message is to be purged from the queue.
*
*
- * SIDE-EFFECT: The message will be taken by the Subscription(sub) for the current Queue(_queue)
+ * SIDE-EFFECT: The message will be taken by the Subscription(sub) for the current Queue(_queue)
+ *
* @param message
* @param sub
+ *
* @return
+ *
* @throws AMQException
*/
private boolean purgeMessage(AMQMessage message, Subscription sub) throws AMQException
{
+ return purgeMessage(message, sub, false);
+ }
+
+ /**
+ * This method will return true if the message is to be purged from the queue.
+ * \
+ * SIDE-EFFECT: The msg will be taken by the Subscription(sub) for the current Queue(_queue) when purgeOnly is false
+ *
+ * @param message
+ * @param sub
+ * @param purgeOnly When set to false the message will be taken by the given Subscription.
+ *
+ * @return if the msg should be purged
+ *
+ * @throws AMQException
+ */
+ private boolean purgeMessage(AMQMessage message, Subscription sub, boolean purgeOnly) throws AMQException
+ {
//Original.. complicated while loop control
// (message != null
// && (
@@ -541,9 +588,18 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager
}
}
- // if we are purging then ensure we mark this message taken for the current subscriber
- // the current subscriber may be null in the case of a get or a purge but this is ok.
- return purge && message.taken(_queue, sub);
+ if (purgeOnly)
+ {
+ // If we are simply purging the queue don't take the message
+ // just purge up to the next non-taken msg.
+ return purge && message.isTaken(_queue);
+ }
+ else
+ {
+ // if we are purging then ensure we mark this message taken for the current subscriber
+ // the current subscriber may be null in the case of a get or a purge but this is ok.
+ return purge && message.taken(_queue, sub);
+ }
}
public void sendNextMessage(Subscription sub, AMQQueue queue)//Queue<AMQMessage> messageQueue)
@@ -574,7 +630,7 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager
{
synchronized (_queueHeadLock)
{
- message = getNextMessage(messageQueue, sub);
+ message = getNextMessage(messageQueue, sub, false);
// message will be null if we have no messages in the messageQueue.
if (message == null)
@@ -592,6 +648,12 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager
") to :" + System.identityHashCode(sub));
}
+
+ if (messageQueue == _messages)
+ {
+ _totalMessageSize.addAndGet(-message.getSize());
+ }
+
sub.send(message, _queue);
//remove sent message from our queue.
@@ -635,14 +697,10 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager
//fixme - we should do the clean up as the message remains on the _message queue
// this is resulting in the next consumer receiving the message and then attempting to purge it
//
- _log.info(debugIdentity() + "We should do clean up of the main _message queue here");
+ cleanMainQueue(sub);
}
}
- if ((message != null) && (messageQueue == _messages))
- {
- _totalMessageSize.addAndGet(-message.getSize());
- }
}
catch (AMQException e)
{
@@ -658,6 +716,18 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager
}
}
+ private void cleanMainQueue(Subscription sub)
+ {
+ try
+ {
+ getNextMessage(_messages, sub, true);
+ }
+ catch (AMQException e)
+ {
+ _log.warn("Problem during main queue purge:" + e.getMessage());
+ }
+ }
+
/**
* enqueues the messages in the list on the queue and all required predelivery queues
*
@@ -747,7 +817,7 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager
{
Subscription s = _subscriptions.nextSubscriber(msg);
- if (s == null) //no-one can take the message right now.
+ if (s == null || (!s.filtersMessages() && hasQueuedMessages())) //no-one can take the message right now or we're queueing
{
if (debugEnabled)
{
@@ -791,10 +861,30 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager
sub.enqueueForPreDelivery(msg, deliverFirst);
}
}
+
+ //if we have a non-filtering subscriber but queued messages && we're not Async && we have other Active subs then something is wrong!
+ if ((s != null && hasQueuedMessages()) && !isProcessingAsync() && _subscriptions.hasActiveSubscribers())
+ {
+ _queue.deliverAsync();
+ }
+
}
}
else
{
+
+ if (s.filtersMessages())
+ {
+ if (s.getPreDeliveryQueue().size() > 0)
+ {
+ _log.error("Direct delivery from PDQ with queued msgs:" + s.getPreDeliveryQueue().size());
+ }
+ }
+ else if (_messages.size() > 0)
+ {
+ _log.error("Direct delivery from MainQueue queued msgs:" + _messages.size());
+ }
+
//release lock now
_lock.unlock();
synchronized (s.getSendLock())
@@ -806,7 +896,36 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager
_log.trace(debugIdentity() + "Delivering Message:" + msg.debugIdentity() + " to(" +
System.identityHashCode(s) + ") :" + s);
}
- msg.taken(_queue, s);
+
+ if (msg.taken(_queue, s))
+ {
+ //Message has been delivered so don't redeliver.
+ // This can currently occur because of the recursive call below
+ // During unit tests the send can occur
+ // client then rejects
+ // this reject then releases the message by the time the
+ // if(!msg.isTaken()) call is made below
+ // the message has been released so that thread loops to send the message again
+ // of course by the time it gets back to here. the thread that released the
+ // message is now ready to send it. Here is a sample trace for reference
+//1192627162613:Thread[pool-917-thread-4,5,main]:CSDM:delivery:(true)message:Message[(HC:5529738 ID:145 Ref:1)]: 145; ref count: 1; taken for queues: {Queue(queue-596fb10e-2968-4e51-a751-1e6643bf9dd6)@16017326=false} by Subs:{Queue(queue-596fb10e-2968-4e51-a751-1e6643bf9dd6)@16017326=null}:sub:[channel=Channel: id 1, transaction mode: true, prefetch marks: 2500/5000, consumerTag=41, session=anonymous(5050419), resendQueue=false]
+//1192627162613:Thread[pool-917-thread-4,5,main]:Msg:taken:Q:Queue(queue-596fb10e-2968-4e51-a751-1e6643bf9dd6)@16017326:sub:[channel=Channel: id 1, transaction mode: true, prefetch marks: 2500/5000, consumerTag=41, session=anonymous(5050419), resendQueue=false]:this:Message[(HC:5529738 ID:145 Ref:1)]: 145; ref count: 1; taken for queues: {Queue(queue-596fb10e-2968-4e51-a751-1e6643bf9dd6)@16017326=false} by Subs:{Queue(queue-596fb10e-2968-4e51-a751-1e6643bf9dd6)@16017326=null}
+//1192627162613:Thread[pool-917-thread-4,5,main]:28398657 Sent :dt:214 msg:(HC:5529738 ID:145 Ref:1)
+//1192627162613:Thread[pool-917-thread-2,5,main]:Reject message by:[channel=Channel: id 1, transaction mode: true, prefetch marks: 2500/5000, consumerTag=41, session=anonymous(5050419), resendQueue=false]
+//1192627162613:Thread[pool-917-thread-2,5,main]:Releasing Message:(HC:5529738 ID:145 Ref:1)
+//1192627162613:Thread[pool-917-thread-2,5,main]:Msg:Release:Q:Queue(queue-596fb10e-2968-4e51-a751-1e6643bf9dd6)@16017326:This:Message[(HC:5529738 ID:145 Ref:1)]: 145; ref count: 1; taken for queues: {Queue(queue-596fb10e-2968-4e51-a751-1e6643bf9dd6)@16017326=false} by Subs:{Queue(queue-596fb10e-2968-4e51-a751-1e6643bf9dd6)@16017326=[channel=Channel: id 1, transaction mode: true, prefetch marks: 2500/5000, consumerTag=41, session=anonymous(5050419), resendQueue=false]}
+//1192627162613:Thread[pool-917-thread-2,5,main]:CSDM:delivery:(true)message:Message[(HC:5529738 ID:145 Ref:1)]: 145; ref count: 1; taken for queues: {Queue(queue-596fb10e-2968-4e51-a751-1e6643bf9dd6)@16017326=false} by Subs:{Queue(queue-596fb10e-2968-4e51-a751-1e6643bf9dd6)@16017326=null}:sub:[channel=Channel: id 1, transaction mode: true, prefetch marks: 2500/5000, consumerTag=33, session=anonymous(26960027), resendQueue=false]
+//1192627162629:Thread[pool-917-thread-4,5,main]:CSDM:suspended: Message((HC:5529738 ID:145 Ref:1)) has not been taken so recursing!: Subscriber:28398657
+//1192627162629:Thread[pool-917-thread-4,5,main]:CSDM:delivery:(true)message:Message[(HC:5529738 ID:145 Ref:1)]: 145; ref count: 1; taken for queues: {Queue(queue-596fb10e-2968-4e51-a751-1e6643bf9dd6)@16017326=false} by Subs:{Queue(queue-596fb10e-2968-4e51-a751-1e6643bf9dd6)@16017326=null}:sub:[channel=Channel: id 1, transaction mode: true, prefetch marks: 2500/5000, consumerTag=33, session=anonymous(26960027), resendQueue=false]
+//1192627162629:Thread[pool-917-thread-2,5,main]:Msg:taken:Q:Queue(queue-596fb10e-2968-4e51-a751-1e6643bf9dd6)@16017326:sub:[channel=Channel: id 1, transaction mode: true, prefetch marks: 2500/5000, consumerTag=33, session=anonymous(26960027), resendQueue=false]:this:Message[(HC:5529738 ID:145 Ref:1)]: 145; ref count: 1; taken for queues: {Queue(queue-596fb10e-2968-4e51-a751-1e6643bf9dd6)@16017326=false} by Subs:{Queue(queue-596fb10e-2968-4e51-a751-1e6643bf9dd6)@16017326=null}
+//1192627162629:Thread[pool-917-thread-2,5,main]:25386607 Sent :dt:172 msg:(HC:5529738 ID:145 Ref:1)
+//1192627162629:Thread[pool-917-thread-4,5,main]:Msg:taken:Q:Queue(queue-596fb10e-2968-4e51-a751-1e6643bf9dd6)@16017326:sub:[channel=Channel: id 1, transaction mode: true, prefetch marks: 2500/5000, consumerTag=33, session=anonymous(26960027), resendQueue=false]:this:Message[(HC:5529738 ID:145 Ref:1)]: 145; ref count: 1; taken for queues: {Queue(queue-596fb10e-2968-4e51-a751-1e6643bf9dd6)@16017326=true} by Subs:{Queue(queue-596fb10e-2968-4e51-a751-1e6643bf9dd6)@16017326=[channel=Channel: id 1, transaction mode: true, prefetch marks: 2500/5000, consumerTag=33, session=anonymous(26960027), resendQueue=false]}
+ // Note: In the last request to take the message from thread 4,5 the message has been
+ // taken by the previous call done by thread 2,5
+
+
+ return;
+ }
//Deliver the message
s.send(msg, _queue);
}
@@ -820,6 +939,10 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager
}
}
+ //
+ // Why do we do this? What was the reasoning? We should have a better approach
+ // than recursion and rejecting if someone else sends it before we do.
+ //
if (!msg.isTaken(_queue))
{
if (debugEnabled)
@@ -859,12 +982,14 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager
return id;
}
- Runner asyncDelivery = new Runner();
+ final Runner _asyncDelivery = new Runner();
private class Runner implements Runnable
{
public void run()
{
+ String startName = Thread.currentThread().getName();
+ Thread.currentThread().setName("CSDM-AsyncDelivery:" + startName);
boolean running = true;
while (running && !_movingMessages.get())
{
@@ -873,13 +998,16 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager
//Check that messages have not been added since we did our last peek();
// Synchronize with the thread that adds to the queue.
// If the queue is still empty then we can exit
-
- if (!(hasQueuedMessages() && _subscriptions.hasActiveSubscribers()))
+ synchronized (_asyncDelivery)
{
- running = false;
- _processing.set(false);
+ if (!(hasQueuedMessages() && _subscriptions.hasActiveSubscribers()))
+ {
+ running = false;
+ _processing.set(false);
+ }
}
}
+ Thread.currentThread().setName(startName);
}
}
@@ -890,24 +1018,28 @@ public class ConcurrentSelectorDeliveryManager implements DeliveryManager
_log.debug(debugIdentity() + "Processing Async." + currentStatus());
}
- if (hasQueuedMessages() && _subscriptions.hasActiveSubscribers())
+ synchronized (_asyncDelivery)
{
- //are we already running? if so, don't re-run
- if (_processing.compareAndSet(false, true))
+ if (hasQueuedMessages() && _subscriptions.hasActiveSubscribers())
{
- if (_log.isDebugEnabled())
+ //are we already running? if so, don't re-run
+ if (_processing.compareAndSet(false, true))
{
- _log.debug(debugIdentity() + "Executing Async process.");
+ if (_log.isDebugEnabled())
+ {
+ _log.debug(debugIdentity() + "Executing Async process.");
+ }
+ executor.execute(_asyncDelivery);
}
- executor.execute(asyncDelivery);
}
}
}
private String currentStatus()
{
- return " Queued:" + (_messages.isEmpty() ? "Empty " : "Contains(M:H)") +
- "(" + _messages.size() + ":" + ((ConcurrentLinkedMessageQueueAtomicSize) _messages).headSize() + ") " +
+ return " Queued:" + (_messages.isEmpty() ? "Empty " : "Contains(H:M)") +
+ "(" + ((ConcurrentLinkedMessageQueueAtomicSize) _messages).headSize() +
+ ":" + (_messages.size() - ((ConcurrentLinkedMessageQueueAtomicSize) _messages).headSize()) + ") " +
" Extra: " + (_hasContent.isEmpty() ? "Empty " : "Contains") +
"(" + _hasContent.size() + ":" + _extraMessages.get() + ") " +
" Active:" + _subscriptions.hasActiveSubscribers() +
diff --git a/java/broker/src/main/java/org/apache/qpid/server/queue/DeliveryManager.java b/java/broker/src/main/java/org/apache/qpid/server/queue/DeliveryManager.java
index 10ba48552c..153106d919 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/queue/DeliveryManager.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/queue/DeliveryManager.java
@@ -72,7 +72,7 @@ interface DeliveryManager
*/
void deliver(StoreContext storeContext, AMQShortString name, AMQMessage msg, boolean deliverFirst) throws FailedDequeueException, AMQException;
- void removeAMessageFromTop(StoreContext storeContext) throws AMQException;
+ void removeAMessageFromTop(StoreContext storeContext, AMQQueue queue) throws AMQException;
long clearAllMessages(StoreContext storeContext) throws AMQException;
diff --git a/java/broker/src/main/java/org/apache/qpid/server/queue/SubscriptionImpl.java b/java/broker/src/main/java/org/apache/qpid/server/queue/SubscriptionImpl.java
index a7be9f2ad2..1299c3a80c 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/queue/SubscriptionImpl.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/queue/SubscriptionImpl.java
@@ -308,6 +308,10 @@ public class SubscriptionImpl implements Subscription
protocolSession.getProtocolOutputConverter().writeDeliver(msg, channel.getChannelId(), deliveryTag, consumerTag);
+ if (!_acks)
+ {
+ msg.decrementReference(storeContext);
+ }
}
}
finally
diff --git a/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java b/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java
index 89f0b7b39d..22fa0fab23 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java
@@ -137,29 +137,32 @@ public abstract class ApplicationRegistry implements IApplicationRegistry
public static IApplicationRegistry getInstance(int instanceID)
{
- IApplicationRegistry instance = _instanceMap.get(instanceID);
-
- if (instance == null)
+ synchronized (IApplicationRegistry.class)
{
- try
+ IApplicationRegistry instance = _instanceMap.get(instanceID);
+
+ if (instance == null)
{
- _logger.info("Creating DEFAULT_APPLICATION_REGISTRY: " + _APPLICATION_REGISTRY + " : Instance:" + instanceID);
- IApplicationRegistry registry = (IApplicationRegistry) Class.forName(_APPLICATION_REGISTRY).getConstructor((Class[]) null).newInstance((Object[]) null);
- ApplicationRegistry.initialise(registry, instanceID);
- _logger.info("Initialised Application Registry:" + instanceID);
- return registry;
+ try
+ {
+ _logger.info("Creating DEFAULT_APPLICATION_REGISTRY: " + _APPLICATION_REGISTRY + " : Instance:" + instanceID);
+ IApplicationRegistry registry = (IApplicationRegistry) Class.forName(_APPLICATION_REGISTRY).getConstructor((Class[]) null).newInstance((Object[]) null);
+ ApplicationRegistry.initialise(registry, instanceID);
+ _logger.info("Initialised Application Registry:" + instanceID);
+ return registry;
+ }
+ catch (Exception e)
+ {
+ _logger.error("Error configuring application: " + e, e);
+ //throw new AMQBrokerCreationException(instanceID, "Unable to create Application Registry instance " + instanceID);
+ throw new RuntimeException("Unable to create Application Registry", e);
+ }
}
- catch (Exception e)
+ else
{
- _logger.error("Error configuring application: " + e, e);
- //throw new AMQBrokerCreationException(instanceID, "Unable to create Application Registry instance " + instanceID);
- throw new RuntimeException("Unable to create Application Registry", e);
+ return instance;
}
}
- else
- {
- return instance;
- }
}
public void close() throws Exception
diff --git a/java/broker/src/main/java/org/apache/qpid/server/txn/TxnBuffer.java b/java/broker/src/main/java/org/apache/qpid/server/txn/TxnBuffer.java
index 405c233552..46a68b6a23 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/txn/TxnBuffer.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/txn/TxnBuffer.java
@@ -54,7 +54,7 @@ public class TxnBuffer
_ops.clear();
}
- private boolean prepare(StoreContext context)
+ private boolean prepare(StoreContext context) throws AMQException
{
for (int i = 0; i < _ops.size(); i++)
{
@@ -63,19 +63,31 @@ public class TxnBuffer
{
op.prepare(context);
}
- catch (Exception e)
+ catch (AMQException e)
{
- //compensate previously prepared ops
- for (int j = 0; j < i; j++)
- {
- _ops.get(j).undoPrepare();
- }
- return false;
+ undoPrepare(i);
+ throw e;
+ }
+ catch (RuntimeException e)
+ {
+ undoPrepare(i);
+ throw e;
}
}
return true;
}
+ private void undoPrepare(int lastPrepared)
+ {
+ //compensate previously prepared ops
+ for (int j = 0; j < lastPrepared; j++)
+ {
+ _ops.get(j).undoPrepare();
+ }
+ }
+
+
+
public void rollback(StoreContext context) throws AMQException
{
for (TxnOp op : _ops)
diff --git a/java/broker/src/test/java/org/apache/qpid/server/RunBrokerWithCommand.java b/java/broker/src/test/java/org/apache/qpid/server/RunBrokerWithCommand.java
index 1ebecbacb6..b8803206e0 100644
--- a/java/broker/src/test/java/org/apache/qpid/server/RunBrokerWithCommand.java
+++ b/java/broker/src/test/java/org/apache/qpid/server/RunBrokerWithCommand.java
@@ -33,11 +33,11 @@ public class RunBrokerWithCommand
public static void main(String[] args)
{
//Start broker
-
try
{
+ String[] fudge = args.clone();
- String[] fudge = new String[1];
+ // Override the first value which is the command we are going to run later.
fudge[0] = "-v";
new Main(fudge).startup();
}
diff --git a/java/broker/src/test/java/org/apache/qpid/server/exchange/ExchangeMBeanTest.java b/java/broker/src/test/java/org/apache/qpid/server/exchange/ExchangeMBeanTest.java
index 3bca0a4545..18d8592817 100644
--- a/java/broker/src/test/java/org/apache/qpid/server/exchange/ExchangeMBeanTest.java
+++ b/java/broker/src/test/java/org/apache/qpid/server/exchange/ExchangeMBeanTest.java
@@ -59,7 +59,7 @@ public class ExchangeMBeanTest extends TestCase
mbean.createNewBinding(_queue.getName().toString(), "binding2");
TabularData data = mbean.bindings();
- ArrayList<CompositeData> list = new ArrayList<CompositeData>(data.values());
+ ArrayList<Object> list = new ArrayList<Object>(data.values());
assertTrue(list.size() == 2);
// test general exchange properties
@@ -86,7 +86,7 @@ public class ExchangeMBeanTest extends TestCase
mbean.createNewBinding(_queue.getName().toString(), "binding2");
TabularData data = mbean.bindings();
- ArrayList<CompositeData> list = new ArrayList<CompositeData>(data.values());
+ ArrayList<Object> list = new ArrayList<Object>(data.values());
assertTrue(list.size() == 2);
// test general exchange properties
@@ -113,7 +113,7 @@ public class ExchangeMBeanTest extends TestCase
mbean.createNewBinding(_queue.getName().toString(), "key3=binding3");
TabularData data = mbean.bindings();
- ArrayList<CompositeData> list = new ArrayList<CompositeData>(data.values());
+ ArrayList<Object> list = new ArrayList<Object>(data.values());
assertTrue(list.size() == 2);
// test general exchange properties
diff --git a/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java b/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java
index 4c02f266ed..3caf6ad73d 100644
--- a/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java
+++ b/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java
@@ -24,10 +24,13 @@ import junit.framework.TestCase;
import org.apache.qpid.AMQException;
import org.apache.qpid.framing.ContentHeaderBody;
import org.apache.qpid.framing.AMQShortString;
+import org.apache.qpid.framing.BasicContentHeaderProperties;
+import org.apache.qpid.framing.ContentBody;
import org.apache.qpid.framing.abstraction.MessagePublishInfo;
import org.apache.qpid.server.AMQChannel;
import org.apache.qpid.server.RequiredDeliveryException;
import org.apache.qpid.server.protocol.TestMinaProtocolSession;
+import org.apache.qpid.server.protocol.AMQProtocolSession;
import org.apache.qpid.server.virtualhost.VirtualHost;
import org.apache.qpid.server.registry.IApplicationRegistry;
import org.apache.qpid.server.registry.ApplicationRegistry;
@@ -36,6 +39,8 @@ import org.apache.qpid.server.txn.NonTransactionalContext;
import org.apache.qpid.server.store.MessageStore;
import org.apache.qpid.server.store.StoreContext;
import org.apache.qpid.server.store.MemoryMessageStore;
+import org.apache.qpid.server.store.TestableMemoryMessageStore;
+import org.apache.mina.common.ByteBuffer;
import javax.management.JMException;
import java.util.LinkedList;
@@ -49,18 +54,16 @@ public class AMQQueueMBeanTest extends TestCase
private static long MESSAGE_SIZE = 1000;
private AMQQueue _queue;
private AMQQueueMBean _queueMBean;
- private MessageStore _messageStore = new MemoryMessageStore();
+ private MessageStore _messageStore;
private StoreContext _storeContext = new StoreContext();
- private TransactionalContext _transactionalContext = new NonTransactionalContext(_messageStore, _storeContext,
- null,
- new LinkedList<RequiredDeliveryException>(),
- new HashSet<Long>());
+ private TransactionalContext _transactionalContext;
private VirtualHost _virtualHost;
+ private AMQProtocolSession _protocolSession;
- public void testMessageCount() throws Exception
+ public void testMessageCountTransient() throws Exception
{
int messageCount = 10;
- sendMessages(messageCount);
+ sendMessages(messageCount, false);
assertTrue(_queueMBean.getMessageCount() == messageCount);
assertTrue(_queueMBean.getReceivedMessageCount() == messageCount);
long queueDepth = (messageCount * MESSAGE_SIZE) >> 10;
@@ -73,6 +76,43 @@ public class AMQQueueMBeanTest extends TestCase
_queueMBean.clearQueue();
assertTrue(_queueMBean.getMessageCount() == 0);
assertTrue(_queueMBean.getReceivedMessageCount() == messageCount);
+
+ //Ensure that the data has been removed from the Store
+ verifyBrokerState();
+ }
+
+ public void testMessageCountPersistent() throws Exception
+ {
+ int messageCount = 10;
+ sendMessages(messageCount, true);
+ assertEquals("", messageCount, _queueMBean.getMessageCount().intValue());
+ assertTrue(_queueMBean.getReceivedMessageCount() == messageCount);
+ long queueDepth = (messageCount * MESSAGE_SIZE) >> 10;
+ assertTrue(_queueMBean.getQueueDepth() == queueDepth);
+
+ _queueMBean.deleteMessageFromTop();
+ assertTrue(_queueMBean.getMessageCount() == (messageCount - 1));
+ assertTrue(_queueMBean.getReceivedMessageCount() == messageCount);
+
+ _queueMBean.clearQueue();
+ assertTrue(_queueMBean.getMessageCount() == 0);
+ assertTrue(_queueMBean.getReceivedMessageCount() == messageCount);
+
+ //Ensure that the data has been removed from the Store
+ verifyBrokerState();
+ }
+
+ // todo: collect to a general testing class -duplicated from Systest/MessageReturntest
+ private void verifyBrokerState()
+ {
+
+ TestableMemoryMessageStore store = new TestableMemoryMessageStore((MemoryMessageStore) _virtualHost.getMessageStore());
+
+ // Unlike MessageReturnTest there is no need for a delay as there this thread does the clean up.
+ assertNotNull("ContentBodyMap should not be null", store.getContentBodyMap());
+ assertEquals("Expected the store to have no content:" + store.getContentBodyMap(), 0, store.getContentBodyMap().size());
+ assertNotNull("MessageMetaDataMap should not be null", store.getMessageMetaDataMap());
+ assertEquals("Expected the store to have no metadata:" + store.getMessageMetaDataMap(), 0, store.getMessageMetaDataMap().size());
}
public void testConsumerCount() throws AMQException
@@ -86,26 +126,26 @@ public class AMQQueueMBeanTest extends TestCase
AMQChannel channel = new AMQChannel(protocolSession, 1, _messageStore, null);
protocolSession.addChannel(channel);
- _queue.registerProtocolSession(protocolSession, 1, new AMQShortString("test"), false, null,false,false);
+ _queue.registerProtocolSession(protocolSession, 1, new AMQShortString("test"), false, null, false, false);
assertTrue(_queueMBean.getActiveConsumerCount() == 1);
SubscriptionSet _subscribers = (SubscriptionSet) mgr;
SubscriptionFactory subscriptionFactory = new SubscriptionImpl.Factory();
- Subscription s1 = subscriptionFactory.createSubscription(channel.getChannelId(),
- protocolSession,
- new AMQShortString("S1"),
- false,
- null,
- true,
- _queue);
-
- Subscription s2 = subscriptionFactory.createSubscription(channel.getChannelId(),
- protocolSession,
- new AMQShortString("S2"),
- false,
- null,
- true,
- _queue);
+ Subscription s1 = subscriptionFactory.createSubscription(channel.getChannelId(),
+ protocolSession,
+ new AMQShortString("S1"),
+ false,
+ null,
+ true,
+ _queue);
+
+ Subscription s2 = subscriptionFactory.createSubscription(channel.getChannelId(),
+ protocolSession,
+ new AMQShortString("S2"),
+ false,
+ null,
+ true,
+ _queue);
_subscribers.addSubscriber(s1);
_subscribers.addSubscriber(s2);
assertTrue(_queueMBean.getActiveConsumerCount() == 3);
@@ -165,7 +205,7 @@ public class AMQQueueMBeanTest extends TestCase
}
- AMQMessage msg = message(false);
+ AMQMessage msg = message(false, false);
long id = msg.getMessageId();
_queue.clearQueue(_storeContext);
@@ -184,7 +224,7 @@ public class AMQQueueMBeanTest extends TestCase
}
}
- private AMQMessage message(final boolean immediate) throws AMQException
+ private AMQMessage message(final boolean immediate, boolean persistent) throws AMQException
{
MessagePublishInfo publish = new MessagePublishInfo()
{
@@ -209,9 +249,11 @@ public class AMQQueueMBeanTest extends TestCase
return null;
}
};
-
+
ContentHeaderBody contentHeaderBody = new ContentHeaderBody();
contentHeaderBody.bodySize = MESSAGE_SIZE; // in bytes
+ contentHeaderBody.properties = new BasicContentHeaderProperties();
+ ((BasicContentHeaderProperties) contentHeaderBody.properties).setDeliveryMode((byte) (persistent ? 2 : 1));
return new AMQMessage(_messageStore.getNewMessageId(), publish, _transactionalContext, contentHeaderBody);
}
@@ -221,22 +263,38 @@ public class AMQQueueMBeanTest extends TestCase
super.setUp();
IApplicationRegistry applicationRegistry = ApplicationRegistry.getInstance();
_virtualHost = applicationRegistry.getVirtualHostRegistry().getVirtualHost("test");
+ _messageStore = _virtualHost.getMessageStore();
+
+ _transactionalContext = new NonTransactionalContext(_messageStore, _storeContext,
+ null,
+ new LinkedList<RequiredDeliveryException>(),
+ new HashSet<Long>());
+
_queue = new AMQQueue(new AMQShortString("testQueue"), false, new AMQShortString("AMQueueMBeanTest"), false, _virtualHost);
_queueMBean = new AMQQueueMBean(_queue);
+
+ _protocolSession = new TestMinaProtocolSession();
}
- private void sendMessages(int messageCount) throws AMQException
+ private void sendMessages(int messageCount, boolean persistent) throws AMQException
{
- AMQMessage[] messages = new AMQMessage[messageCount];
- for (int i = 0; i < messages.length; i++)
- {
- messages[i] = message(false);
- messages[i].enqueue(_queue);
- messages[i].routingComplete(_messageStore, _storeContext, new MessageHandleFactory());
- }
for (int i = 0; i < messageCount; i++)
{
- _queue.process(_storeContext, messages[i], false);
+ AMQMessage currentMessage = message(false, persistent);
+ currentMessage.enqueue(_queue);
+
+ // route header
+ currentMessage.routingComplete(_messageStore, _storeContext, new MessageHandleFactory());
+
+ // Add the body so we have somthing to test later
+ currentMessage.addContentBodyFrame(_storeContext,
+ _protocolSession.getRegistry()
+ .getProtocolVersionMethodConverter()
+ .convertToContentChunk(
+ new ContentBody(ByteBuffer.allocate((int) MESSAGE_SIZE),
+ MESSAGE_SIZE)));
+
+
}
}
}
diff --git a/java/broker/src/test/java/org/apache/qpid/server/store/TestableMemoryMessageStore.java b/java/broker/src/test/java/org/apache/qpid/server/store/TestableMemoryMessageStore.java
new file mode 100644
index 0000000000..48d808142c
--- /dev/null
+++ b/java/broker/src/test/java/org/apache/qpid/server/store/TestableMemoryMessageStore.java
@@ -0,0 +1,73 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.store;
+
+import org.apache.qpid.server.queue.MessageMetaData;
+import org.apache.qpid.framing.ContentBody;
+import org.apache.qpid.framing.abstraction.ContentChunk;
+
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.List;
+
+/**
+ * Adds some extra methods to the memory message store for testing purposes.
+ */
+public class TestableMemoryMessageStore extends MemoryMessageStore
+{
+
+ MemoryMessageStore _mms = null;
+
+ public TestableMemoryMessageStore(MemoryMessageStore mms)
+ {
+ _mms = mms;
+ }
+
+ public TestableMemoryMessageStore()
+ {
+ _metaDataMap = new ConcurrentHashMap<Long, MessageMetaData>();
+ _contentBodyMap = new ConcurrentHashMap<Long, List<ContentChunk>>();
+ }
+
+ public ConcurrentMap<Long, MessageMetaData> getMessageMetaDataMap()
+ {
+ if (_mms != null)
+ {
+ return _mms._metaDataMap;
+ }
+ else
+ {
+ return _metaDataMap;
+ }
+ }
+
+ public ConcurrentMap<Long, List<ContentChunk>> getContentBodyMap()
+ {
+ if (_mms != null)
+ {
+ return _mms._contentBodyMap;
+ }
+ else
+ {
+ return _contentBodyMap;
+ }
+ }
+}
diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java b/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
index 81b2580317..9abc94b3df 100644
--- a/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
+++ b/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
@@ -29,6 +29,7 @@ import org.apache.qpid.client.failover.FailoverProtectedOperation;
import org.apache.qpid.client.failover.FailoverRetrySupport;
import org.apache.qpid.client.protocol.AMQProtocolHandler;
import org.apache.qpid.client.state.AMQState;
+import org.apache.qpid.client.state.AMQStateManager;
import org.apache.qpid.client.transport.TransportConnection;
import org.apache.qpid.exchange.ExchangeDefaults;
import org.apache.qpid.framing.AMQShortString;
@@ -69,11 +70,7 @@ import java.io.IOException;
import java.net.ConnectException;
import java.nio.channels.UnresolvedAddressException;
import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.Map;
+import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
@@ -91,6 +88,8 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
*/
private final Object _failoverMutex = new Object();
+ private final Object _sessionCreationLock = new Object();
+
/**
* A channel is roughly analogous to a session. The server can negotiate the maximum number of channels per session
* and we must prevent the client from opening too many. Zero means unlimited.
@@ -298,6 +297,11 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
{
lastException = e;
+ //We need to change protocol handler here as an error during the connect will not
+ // cause the StateManager to be replaced. So the state is out of sync on reconnect
+ // This can be seen when a exception occurs during connection. i.e. log4j NoSuchMethod. (using < 1.2.12)
+ _protocolHandler.setStateManager(new AMQStateManager());
+
if (_logger.isInfoEnabled())
{
_logger.info("Unable to connect to broker at " + _failoverPolicy.getCurrentBrokerDetails(),
@@ -503,6 +507,8 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
public org.apache.qpid.jms.Session createSession(final boolean transacted, final int acknowledgeMode,
final int prefetchHigh, final int prefetchLow) throws JMSException
{
+ synchronized(_sessionCreationLock)
+ {
checkNotClosed();
if (channelLimitReached())
@@ -566,6 +572,7 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
return session;
}
}, this).execute();
+ }
}
private void createChannelOverWire(int channelId, int prefetchHigh, int prefetchLow, boolean transacted)
@@ -754,45 +761,74 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
public void close(long timeout) throws JMSException
{
- synchronized (getFailoverMutex())
+ close(new ArrayList<AMQSession>(_sessions.values()),timeout);
+ }
+
+ public void close(List<AMQSession> sessions, long timeout) throws JMSException
+ {
+ synchronized(_sessionCreationLock)
{
- if (!_closed.getAndSet(true))
+ if(!sessions.isEmpty())
{
- try
+ AMQSession session = sessions.remove(0);
+ synchronized(session.getMessageDeliveryLock())
+ {
+ close(sessions, timeout);
+ }
+ }
+ else
+ {
+ synchronized (getFailoverMutex())
+ {
+ if (!_closed.getAndSet(true))
{
- long startCloseTime = System.currentTimeMillis();
+ try
+ {
+ long startCloseTime = System.currentTimeMillis();
- _taskPool.shutdown();
- closeAllSessions(null, timeout, startCloseTime);
+ _taskPool.shutdown();
+ closeAllSessions(null, timeout, startCloseTime);
- if (!_taskPool.isTerminated())
- {
- try
+ if (!_taskPool.isTerminated())
{
- // adjust timeout
- long taskPoolTimeout = adjustTimeout(timeout, startCloseTime);
+ try
+ {
+ // adjust timeout
+ long taskPoolTimeout = adjustTimeout(timeout, startCloseTime);
- _taskPool.awaitTermination(taskPoolTimeout, TimeUnit.MILLISECONDS);
- }
- catch (InterruptedException e)
- {
- _logger.info("Interrupted while shutting down connection thread pool.");
+ _taskPool.awaitTermination(taskPoolTimeout, TimeUnit.MILLISECONDS);
+ }
+ catch (InterruptedException e)
+ {
+ _logger.info("Interrupted while shutting down connection thread pool.");
+ }
}
- }
- // adjust timeout
- timeout = adjustTimeout(timeout, startCloseTime);
+ // adjust timeout
+ timeout = adjustTimeout(timeout, startCloseTime);
- _protocolHandler.closeConnection(timeout);
+ _protocolHandler.closeConnection(timeout);
- }
- catch (AMQException e)
- {
- JMSException jmse = new JMSException("Error closing connection: " + e);
- jmse.setLinkedException(e);
- throw jmse;
+ //If the taskpool hasn't shutdown by now then give it shutdownNow.
+ // This will interupt any running tasks.
+ if (!_taskPool.isTerminated())
+ {
+ List<Runnable> tasks = _taskPool.shutdownNow();
+ for (Runnable r : tasks)
+ {
+ _logger.warn("Connection close forced taskpool to prevent execution:" + r);
+ }
+ }
+ }
+ catch (AMQException e)
+ {
+ JMSException jmse = new JMSException("Error closing connection: " + e);
+ jmse.setLinkedException(e);
+ throw jmse;
+ }
}
}
+ }
}
}
@@ -1108,6 +1144,10 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
{
_exceptionListener.onException(je);
}
+ else
+ {
+ _logger.error("Throwable Received but no listener set: " + cause.getMessage());
+ }
if (!(cause instanceof AMQUndeliveredException) && !(cause instanceof AMQAuthenticationException))
{
diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQConnectionFactory.java b/java/client/src/main/java/org/apache/qpid/client/AMQConnectionFactory.java
index bfac194d5d..7c0803a61a 100644
--- a/java/client/src/main/java/org/apache/qpid/client/AMQConnectionFactory.java
+++ b/java/client/src/main/java/org/apache/qpid/client/AMQConnectionFactory.java
@@ -23,6 +23,7 @@ package org.apache.qpid.client;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Hashtable;
+import java.util.UUID;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
@@ -125,21 +126,25 @@ public class AMQConnectionFactory implements ConnectionFactory, QueueConnectionF
}
_defaultPassword = password;
}
-
+
/**
* Getter for SSLConfiguration
+ *
* @return SSLConfiguration if set, otherwise null
*/
- public final SSLConfiguration getSSLConfiguration() {
- return _sslConfig;
+ public final SSLConfiguration getSSLConfiguration()
+ {
+ return _sslConfig;
}
-
+
/**
* Setter for SSLConfiguration
+ *
* @param sslConfig config to store
*/
- public final void setSSLConfiguration(SSLConfiguration sslConfig) {
- _sslConfig = sslConfig;
+ public final void setSSLConfiguration(SSLConfiguration sslConfig)
+ {
+ _sslConfig = sslConfig;
}
/**
@@ -243,7 +248,7 @@ public class AMQConnectionFactory implements ConnectionFactory, QueueConnectionF
}
catch (UnknownHostException e)
{
- return null;
+ return "UnknownHost" + UUID.randomUUID();
}
}
@@ -336,7 +341,9 @@ public class AMQConnectionFactory implements ConnectionFactory, QueueConnectionF
* @param name
* @param ctx
* @param env
+ *
* @return AMQConnection,AMQTopic,AMQQueue, or AMQConnectionFactory.
+ *
* @throws Exception
*/
public Object getObjectInstance(Object obj, Name name, Context ctx,
diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQSession.java b/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
index 4e259f651c..a0b79b135d 100644
--- a/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
+++ b/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
@@ -24,6 +24,7 @@ import org.apache.qpid.AMQException;
import org.apache.qpid.AMQInvalidArgumentException;
import org.apache.qpid.AMQInvalidRoutingKeyException;
import org.apache.qpid.AMQUndeliveredException;
+import org.apache.qpid.AMQDisconnectedException;
import org.apache.qpid.client.failover.FailoverException;
import org.apache.qpid.client.failover.FailoverNoopSupport;
import org.apache.qpid.client.failover.FailoverProtectedOperation;
@@ -72,7 +73,6 @@ import org.apache.qpid.protocol.AMQConstant;
import org.apache.qpid.protocol.AMQMethodEvent;
import org.apache.qpid.url.AMQBindingURL;
import org.apache.qpid.url.URLSyntaxException;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -100,7 +100,6 @@ import javax.jms.Topic;
import javax.jms.TopicPublisher;
import javax.jms.TopicSession;
import javax.jms.TopicSubscriber;
-
import java.io.Serializable;
import java.text.MessageFormat;
import java.util.ArrayList;
@@ -108,26 +107,26 @@ import java.util.Arrays;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
/**
- *
* <p/><table id="crc"><caption>CRC Card</caption>
* <tr><th> Responsibilities <th> Collaborations
* <tr><td>
* </table>
*
* @todo Different FailoverSupport implementation are needed on the same method call, in different situations. For
- * example, when failing-over and reestablishing the bindings, the bind cannot be interrupted by a second
- * fail-over, if it fails with an exception, the fail-over process should also fail. When binding outside of
- * the fail-over process, the retry handler could be used to automatically retry the operation once the connection
- * has been reestablished. All fail-over protected operations should be placed in private methods, with
- * FailoverSupport passed in by the caller to provide the correct support for the calling context. Sometimes the
- * fail-over process sets a nowait flag and uses an async method call instead.
- *
+ * example, when failing-over and reestablishing the bindings, the bind cannot be interrupted by a second
+ * fail-over, if it fails with an exception, the fail-over process should also fail. When binding outside of
+ * the fail-over process, the retry handler could be used to automatically retry the operation once the connection
+ * has been reestablished. All fail-over protected operations should be placed in private methods, with
+ * FailoverSupport passed in by the caller to provide the correct support for the calling context. Sometimes the
+ * fail-over process sets a nowait flag and uses an async method call instead.
* @todo Two new objects created on every failover supported method call. Consider more efficient ways of doing this,
- * after looking at worse bottlenecks first.
+ * after looking at worse bottlenecks first.
*/
public class AMQSession extends Closeable implements Session, QueueSession, TopicSession
{
@@ -206,14 +205,14 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
* subscriptions between executions of the client.
*/
private final ConcurrentHashMap<String, TopicSubscriberAdaptor> _subscriptions =
- new ConcurrentHashMap<String, TopicSubscriberAdaptor>();
+ new ConcurrentHashMap<String, TopicSubscriberAdaptor>();
/**
* Holds a mapping from message consumers to their identifying names, so that their subscriptions may be looked
* up in the {@link #_subscriptions} map.
*/
private final ConcurrentHashMap<BasicMessageConsumer, String> _reverseSubscriptionMap =
- new ConcurrentHashMap<BasicMessageConsumer, String>();
+ new ConcurrentHashMap<BasicMessageConsumer, String>();
/**
* Used to hold incoming messages.
@@ -222,6 +221,9 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
*/
private final FlowControllingBlockingQueue _queue;
+ /** Holds the highest received delivery tag. */
+ private final AtomicLong _highestDeliveryTag = new AtomicLong(-1);
+
/** Holds the dispatcher thread for this session. */
private Dispatcher _dispatcher;
@@ -231,9 +233,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
/** Holds all of the producers created by this session, keyed by their unique identifiers. */
private Map<Long, MessageProducer> _producers = new ConcurrentHashMap<Long, MessageProducer>();
- /**
- * Used as a source of unique identifiers so that the consumers can be tagged to match them to BasicConsume methods.
- */
+ /** Used as a source of unique identifiers so that the consumers can be tagged to match them to BasicConsume methods. */
private int _nextTag = 1;
/**
@@ -241,11 +241,11 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
* consumer.
*/
private Map<AMQShortString, BasicMessageConsumer> _consumers =
- new ConcurrentHashMap<AMQShortString, BasicMessageConsumer>();
+ new ConcurrentHashMap<AMQShortString, BasicMessageConsumer>();
/** Provides a count of consumers on destinations, in order to be able to know if a destination has consumers. */
private ConcurrentHashMap<Destination, AtomicInteger> _destinationConsumerCount =
- new ConcurrentHashMap<Destination, AtomicInteger>();
+ new ConcurrentHashMap<Destination, AtomicInteger>();
/**
* Used as a source of unique identifiers for producers within the session.
@@ -305,15 +305,15 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
* @param defaultPrefetchLowMark The number of prefetched messages at which to resume the session.
*/
AMQSession(AMQConnection con, int channelId, boolean transacted, int acknowledgeMode,
- MessageFactoryRegistry messageFactoryRegistry, int defaultPrefetchHighMark, int defaultPrefetchLowMark)
+ MessageFactoryRegistry messageFactoryRegistry, int defaultPrefetchHighMark, int defaultPrefetchLowMark)
{
_strictAMQP = Boolean.parseBoolean(System.getProperties().getProperty(STRICT_AMQP, STRICT_AMQP_DEFAULT));
_strictAMQPFATAL =
- Boolean.parseBoolean(System.getProperties().getProperty(STRICT_AMQP_FATAL, STRICT_AMQP_FATAL_DEFAULT));
+ Boolean.parseBoolean(System.getProperties().getProperty(STRICT_AMQP_FATAL, STRICT_AMQP_FATAL_DEFAULT));
_immediatePrefetch =
- _strictAMQP
- || Boolean.parseBoolean(System.getProperties().getProperty(IMMEDIATE_PREFETCH, IMMEDIATE_PREFETCH_DEFAULT));
+ _strictAMQP
+ || Boolean.parseBoolean(System.getProperties().getProperty(IMMEDIATE_PREFETCH, IMMEDIATE_PREFETCH_DEFAULT));
_connection = con;
_transacted = transacted;
@@ -334,31 +334,31 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
if (_acknowledgeMode == NO_ACKNOWLEDGE)
{
_queue =
- new FlowControllingBlockingQueue(_defaultPrefetchHighMark, _defaultPrefetchLowMark,
- new FlowControllingBlockingQueue.ThresholdListener()
- {
- public void aboveThreshold(int currentValue)
- {
- if (_acknowledgeMode == NO_ACKNOWLEDGE)
- {
- _logger.debug(
- "Above threshold(" + _defaultPrefetchHighMark
- + ") so suspending channel. Current value is " + currentValue);
- new Thread(new SuspenderRunner(true)).start();
- }
- }
-
- public void underThreshold(int currentValue)
- {
- if (_acknowledgeMode == NO_ACKNOWLEDGE)
- {
- _logger.debug(
- "Below threshold(" + _defaultPrefetchLowMark
- + ") so unsuspending channel. Current value is " + currentValue);
- new Thread(new SuspenderRunner(false)).start();
- }
- }
- });
+ new FlowControllingBlockingQueue(_defaultPrefetchHighMark, _defaultPrefetchLowMark,
+ new FlowControllingBlockingQueue.ThresholdListener()
+ {
+ public void aboveThreshold(int currentValue)
+ {
+ if (_acknowledgeMode == NO_ACKNOWLEDGE)
+ {
+ _logger.debug(
+ "Above threshold(" + _defaultPrefetchHighMark
+ + ") so suspending channel. Current value is " + currentValue);
+ new Thread(new SuspenderRunner(true)).start();
+ }
+ }
+
+ public void underThreshold(int currentValue)
+ {
+ if (_acknowledgeMode == NO_ACKNOWLEDGE)
+ {
+ _logger.debug(
+ "Below threshold(" + _defaultPrefetchLowMark
+ + ") so unsuspending channel. Current value is " + currentValue);
+ new Thread(new SuspenderRunner(false)).start();
+ }
+ }
+ });
}
else
{
@@ -369,18 +369,18 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
/**
* Creates a new session on a connection with the default message factory factory.
*
- * @param con The connection on which to create the session.
- * @param channelId The unique identifier for the session.
- * @param transacted Indicates whether or not the session is transactional.
- * @param acknowledgeMode The acknoledgement mode for the session.
- * @param defaultPrefetchHigh The maximum number of messages to prefetched before suspending the session.
- * @param defaultPrefetchLow The number of prefetched messages at which to resume the session.
+ * @param con The connection on which to create the session.
+ * @param channelId The unique identifier for the session.
+ * @param transacted Indicates whether or not the session is transactional.
+ * @param acknowledgeMode The acknoledgement mode for the session.
+ * @param defaultPrefetchHigh The maximum number of messages to prefetched before suspending the session.
+ * @param defaultPrefetchLow The number of prefetched messages at which to resume the session.
*/
AMQSession(AMQConnection con, int channelId, boolean transacted, int acknowledgeMode, int defaultPrefetchHigh,
- int defaultPrefetchLow)
+ int defaultPrefetchLow)
{
this(con, channelId, transacted, acknowledgeMode, MessageFactoryRegistry.newDefaultRegistry(), defaultPrefetchHigh,
- defaultPrefetchLow);
+ defaultPrefetchLow);
}
// ===== JMS Session methods.
@@ -397,12 +397,8 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
public BytesMessage createBytesMessage() throws JMSException
{
- synchronized (_connection.getFailoverMutex())
- {
- checkNotClosed();
-
- return new JMSBytesMessage();
- }
+ checkNotClosed();
+ return new JMSBytesMessage();
}
/**
@@ -435,8 +431,8 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
public void acknowledgeMessage(long deliveryTag, boolean multiple)
{
final AMQFrame ackFrame =
- BasicAckBody.createAMQFrame(_channelId, getProtocolMajorVersion(), getProtocolMinorVersion(), deliveryTag,
- multiple);
+ BasicAckBody.createAMQFrame(_channelId, getProtocolMajorVersion(), getProtocolMinorVersion(), deliveryTag,
+ multiple);
if (_logger.isDebugEnabled())
{
@@ -457,33 +453,31 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
* @param exchangeName The exchange to bind the queue on.
*
* @throws AMQException If the queue cannot be bound for any reason.
- *
* @todo Be aware of possible changes to parameter order as versions change.
- *
* @todo Document the additional arguments that may be passed in the field table. Are these for headers exchanges?
*/
public void bindQueue(final AMQShortString queueName, final AMQShortString routingKey, final FieldTable arguments,
- final AMQShortString exchangeName) throws AMQException
+ final AMQShortString exchangeName) throws AMQException
{
/*new FailoverRetrySupport<Object, AMQException>(new FailoverProtectedOperation<Object, AMQException>()*/
new FailoverNoopSupport<Object, AMQException>(new FailoverProtectedOperation<Object, AMQException>()
+ {
+ public Object execute() throws AMQException, FailoverException
{
- public Object execute() throws AMQException, FailoverException
- {
- AMQFrame queueBind =
+ AMQFrame queueBind =
QueueBindBody.createAMQFrame(_channelId, getProtocolMajorVersion(), getProtocolMinorVersion(),
- arguments, // arguments
- exchangeName, // exchange
- false, // nowait
- queueName, // queue
- routingKey, // routingKey
- getTicket()); // ticket
+ arguments, // arguments
+ exchangeName, // exchange
+ false, // nowait
+ queueName, // queue
+ routingKey, // routingKey
+ getTicket()); // ticket
- getProtocolHandler().syncWrite(queueBind, QueueBindOkBody.class);
+ getProtocolHandler().syncWrite(queueBind, QueueBindOkBody.class);
- return null;
- }
- }, _connection).execute();
+ return null;
+ }
+ }, _connection).execute();
}
/**
@@ -496,73 +490,70 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
* @param timeout The timeout in milliseconds to wait for the session close acknoledgement from the broker.
*
* @throws JMSException If the JMS provider fails to close the session due to some internal error.
- *
* @todo Be aware of possible changes to parameter order as versions change.
- *
* @todo Not certain about the logic of ignoring the failover exception, because the channel won't be
- * re-opened. May need to examine this more carefully.
- *
+ * re-opened. May need to examine this more carefully.
* @todo Note that taking the failover mutex doesn't prevent this operation being interrupted by a failover,
- * because the failover process sends the failover event before acquiring the mutex itself.
+ * because the failover process sends the failover event before acquiring the mutex itself.
*/
public void close(long timeout) throws JMSException
{
if (_logger.isInfoEnabled())
{
+ StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
_logger.info("Closing session: " + this + ":"
- + Arrays.asList(Thread.currentThread().getStackTrace()).subList(3, 6));
+ + Arrays.asList(stackTrace).subList(3, stackTrace.length - 1));
}
- synchronized(_messageDeliveryLock)
- {
-
- // We must close down all producers and consumers in an orderly fashion. This is the only method
- // that can be called from a different thread of control from the one controlling the session.
synchronized (_connection.getFailoverMutex())
{
- // Ensure we only try and close an open session.
- if (!_closed.getAndSet(true))
+ // We must close down all producers and consumers in an orderly fashion. This is the only method
+ // that can be called from a different thread of control from the one controlling the session.
+ synchronized (_messageDeliveryLock)
{
- // we pass null since this is not an error case
- closeProducersAndConsumers(null);
-
- try
+ // Ensure we only try and close an open session.
+ if (!_closed.getAndSet(true))
{
+ // we pass null since this is not an error case
+ closeProducersAndConsumers(null);
- getProtocolHandler().closeSession(this);
+ try
+ {
- final AMQFrame frame =
- ChannelCloseBody.createAMQFrame(getChannelId(), getProtocolMajorVersion(), getProtocolMinorVersion(),
- 0, // classId
- 0, // methodId
- AMQConstant.REPLY_SUCCESS.getCode(), // replyCode
- new AMQShortString("JMS client closing channel")); // replyText
+ getProtocolHandler().closeSession(this);
- getProtocolHandler().syncWrite(frame, ChannelCloseOkBody.class, timeout);
+ final AMQFrame frame =
+ ChannelCloseBody.createAMQFrame(getChannelId(), getProtocolMajorVersion(), getProtocolMinorVersion(),
+ 0, // classId
+ 0, // methodId
+ AMQConstant.REPLY_SUCCESS.getCode(), // replyCode
+ new AMQShortString("JMS client closing channel")); // replyText
- // When control resumes at this point, a reply will have been received that
- // indicates the broker has closed the channel successfully.
- }
- catch (AMQException e)
- {
- JMSException jmse = new JMSException("Error closing session: " + e);
- jmse.setLinkedException(e);
- throw jmse;
- }
- // This is ignored because the channel is already marked as closed so the fail-over process will
- // not re-open it.
- catch (FailoverException e)
- {
- _logger.debug(
- "Got FailoverException during channel close, ignored as channel already marked as closed.");
- }
- finally
- {
- _connection.deregisterSession(_channelId);
+ getProtocolHandler().syncWrite(frame, ChannelCloseOkBody.class, timeout);
+
+ // When control resumes at this point, a reply will have been received that
+ // indicates the broker has closed the channel successfully.
+ }
+ catch (AMQException e)
+ {
+ JMSException jmse = new JMSException("Error closing session: " + e);
+ jmse.setLinkedException(e);
+ throw jmse;
+ }
+ // This is ignored because the channel is already marked as closed so the fail-over process will
+ // not re-open it.
+ catch (FailoverException e)
+ {
+ _logger.debug(
+ "Got FailoverException during channel close, ignored as channel already marked as closed.");
+ }
+ finally
+ {
+ _connection.deregisterSession(_channelId);
+ }
}
}
}
- }
}
/**
@@ -572,26 +563,34 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
*/
public void closed(Throwable e) throws JMSException
{
- synchronized(_messageDeliveryLock)
- {
synchronized (_connection.getFailoverMutex())
{
- // An AMQException has an error code and message already and will be passed in when closure occurs as a
- // result of a channel close request
- _closed.set(true);
- AMQException amqe;
- if (e instanceof AMQException)
+ if (e instanceof AMQDisconnectedException)
{
- amqe = (AMQException) e;
+ if (_dispatcher != null)
+ {
+ // Failover failed and ain't coming back. Knife the dispatcher.
+ _dispatcher.interrupt();
+ }
}
- else
+ synchronized (_messageDeliveryLock)
{
- amqe = new AMQException("Closing session forcibly", e);
- }
+ // An AMQException has an error code and message already and will be passed in when closure occurs as a
+ // result of a channel close request
+ _closed.set(true);
+ AMQException amqe;
+ if (e instanceof AMQException)
+ {
+ amqe = (AMQException) e;
+ }
+ else
+ {
+ amqe = new AMQException("Closing session forcibly", e);
+ }
- _connection.deregisterSession(_channelId);
- closeProducersAndConsumers(amqe);
- }
+ _connection.deregisterSession(_channelId);
+ closeProducersAndConsumers(amqe);
+ }
}
}
@@ -605,7 +604,6 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
* @throws JMSException If the JMS provider fails to commit the transaction due to some internal error. This does
* not mean that the commit is known to have failed, merely that it is not known whether it
* failed or not.
- *
* @todo Be aware of possible changes to parameter order as versions change.
*/
public void commit() throws JMSException
@@ -626,7 +624,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
final AMQProtocolHandler handler = getProtocolHandler();
handler.syncWrite(TxCommitBody.createAMQFrame(_channelId, getProtocolMajorVersion(), getProtocolMinorVersion()),
- TxCommitOkBody.class);
+ TxCommitOkBody.class);
}
catch (AMQException e)
{
@@ -662,7 +660,6 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
else
{
_logger.info("Dispatcher is null so created stopped dispatcher");
-
startDistpatcherIfNecessary(true);
}
@@ -709,12 +706,12 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
}
public MessageConsumer createBrowserConsumer(Destination destination, String messageSelector, boolean noLocal)
- throws JMSException
+ throws JMSException
{
checkValidDestination(destination);
return createConsumerImpl(destination, _defaultPrefetchHighMark, _defaultPrefetchLowMark, noLocal, false,
- messageSelector, null, true, true);
+ messageSelector, null, true, true);
}
public MessageConsumer createConsumer(Destination destination) throws JMSException
@@ -722,7 +719,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
checkValidDestination(destination);
return createConsumerImpl(destination, _defaultPrefetchHighMark, _defaultPrefetchLowMark, false, false, null, null,
- false, false);
+ false, false);
}
public MessageConsumer createConsumer(Destination destination, String messageSelector) throws JMSException
@@ -730,20 +727,20 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
checkValidDestination(destination);
return createConsumerImpl(destination, _defaultPrefetchHighMark, _defaultPrefetchLowMark, false, false,
- messageSelector, null, false, false);
+ messageSelector, null, false, false);
}
public MessageConsumer createConsumer(Destination destination, String messageSelector, boolean noLocal)
- throws JMSException
+ throws JMSException
{
checkValidDestination(destination);
return createConsumerImpl(destination, _defaultPrefetchHighMark, _defaultPrefetchLowMark, noLocal, false,
- messageSelector, null, false, false);
+ messageSelector, null, false, false);
}
public MessageConsumer createConsumer(Destination destination, int prefetch, boolean noLocal, boolean exclusive,
- String selector) throws JMSException
+ String selector) throws JMSException
{
checkValidDestination(destination);
@@ -751,7 +748,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
}
public MessageConsumer createConsumer(Destination destination, int prefetchHigh, int prefetchLow, boolean noLocal,
- boolean exclusive, String selector) throws JMSException
+ boolean exclusive, String selector) throws JMSException
{
checkValidDestination(destination);
@@ -759,7 +756,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
}
public MessageConsumer createConsumer(Destination destination, int prefetch, boolean noLocal, boolean exclusive,
- String selector, FieldTable rawSelector) throws JMSException
+ String selector, FieldTable rawSelector) throws JMSException
{
checkValidDestination(destination);
@@ -767,12 +764,12 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
}
public MessageConsumer createConsumer(Destination destination, int prefetchHigh, int prefetchLow, boolean noLocal,
- boolean exclusive, String selector, FieldTable rawSelector) throws JMSException
+ boolean exclusive, String selector, FieldTable rawSelector) throws JMSException
{
checkValidDestination(destination);
return createConsumerImpl(destination, prefetchHigh, prefetchLow, noLocal, exclusive, selector, rawSelector, false,
- false);
+ false);
}
public TopicSubscriber createDurableSubscriber(Topic topic, String name) throws JMSException
@@ -787,7 +784,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
if (subscriber.getTopic().equals(topic))
{
throw new IllegalStateException("Already subscribed to topic " + topic + " with subscription exchange "
- + name);
+ + name);
}
else
{
@@ -815,7 +812,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
else
{
_logger.warn("Unable to determine if subscription already exists for '" + topicName + "' "
- + "for creation durableSubscriber. Requesting queue deletion regardless.");
+ + "for creation durableSubscriber. Requesting queue deletion regardless.");
}
deleteQueue(dest.getAMQQueueName());
@@ -825,7 +822,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
// if the queue is bound to the exchange but NOT for this topic, then the JMS spec
// says we must trash the subscription.
if (isQueueBound(dest.getExchangeName(), dest.getAMQQueueName())
- && !isQueueBound(dest.getExchangeName(), dest.getAMQQueueName(), topicName))
+ && !isQueueBound(dest.getExchangeName(), dest.getAMQQueueName(), topicName))
{
deleteQueue(dest.getAMQQueueName());
}
@@ -842,7 +839,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
/** Note, currently this does not handle reuse of the same name with different topics correctly. */
public TopicSubscriber createDurableSubscriber(Topic topic, String name, String messageSelector, boolean noLocal)
- throws JMSException
+ throws JMSException
{
checkNotClosed();
checkValidTopic(topic);
@@ -857,12 +854,8 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
public MapMessage createMapMessage() throws JMSException
{
- synchronized (_connection.getFailoverMutex())
- {
- checkNotClosed();
-
- return new JMSMapMessage();
- }
+ checkNotClosed();
+ return new JMSMapMessage();
}
public javax.jms.Message createMessage() throws JMSException
@@ -872,12 +865,8 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
public ObjectMessage createObjectMessage() throws JMSException
{
- synchronized (_connection.getFailoverMutex())
- {
- checkNotClosed();
-
- return (ObjectMessage) new JMSObjectMessage();
- }
+ checkNotClosed();
+ return (ObjectMessage) new JMSObjectMessage();
}
public ObjectMessage createObjectMessage(Serializable object) throws JMSException
@@ -899,13 +888,13 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
}
public BasicMessageProducer createProducer(Destination destination, boolean mandatory, boolean immediate)
- throws JMSException
+ throws JMSException
{
return createProducerImpl(destination, mandatory, immediate);
}
public BasicMessageProducer createProducer(Destination destination, boolean mandatory, boolean immediate,
- boolean waitUntilSent) throws JMSException
+ boolean waitUntilSent) throws JMSException
{
return createProducerImpl(destination, mandatory, immediate, waitUntilSent);
}
@@ -951,32 +940,31 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
* @param exclusive Flag to indicate that the queue is exclusive to this client.
*
* @throws AMQException If the queue cannot be declared for any reason.
- *
* @todo Be aware of possible changes to parameter order as versions change.
*/
public void createQueue(final AMQShortString name, final boolean autoDelete, final boolean durable,
- final boolean exclusive) throws AMQException
+ final boolean exclusive) throws AMQException
{
new FailoverRetrySupport<Object, AMQException>(new FailoverProtectedOperation<Object, AMQException>()
+ {
+ public Object execute() throws AMQException, FailoverException
{
- public Object execute() throws AMQException, FailoverException
- {
- AMQFrame queueDeclare =
+ AMQFrame queueDeclare =
QueueDeclareBody.createAMQFrame(_channelId, getProtocolMajorVersion(), getProtocolMinorVersion(),
- null, // arguments
- autoDelete, // autoDelete
- durable, // durable
- exclusive, // exclusive
- false, // nowait
- false, // passive
- name, // queue
- getTicket()); // ticket
-
- getProtocolHandler().syncWrite(queueDeclare, QueueDeclareOkBody.class);
-
- return null;
- }
- }, _connection).execute();
+ null, // arguments
+ autoDelete, // autoDelete
+ durable, // durable
+ exclusive, // exclusive
+ false, // nowait
+ false, // passive
+ name, // queue
+ getTicket()); // ticket
+
+ getProtocolHandler().syncWrite(queueDeclare, QueueDeclareOkBody.class);
+
+ return null;
+ }
+ }, _connection).execute();
}
/**
@@ -1269,8 +1257,8 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
if (_logger.isDebugEnabled())
{
_logger.debug("Message["
- + ((message.getDeliverBody() == null) ? ("B:" + message.getBounceBody()) : ("D:" + message.getDeliverBody()))
- + "] received in session with channel id " + _channelId);
+ + ((message.getDeliverBody() == null) ? ("B:" + message.getBounceBody()) : ("D:" + message.getDeliverBody()))
+ + "] received in session with channel id " + _channelId);
}
if (message.getDeliverBody() == null)
@@ -1280,6 +1268,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
}
else
{
+ _highestDeliveryTag.set(message.getDeliverBody().deliveryTag);
_queue.add(message);
}
}
@@ -1296,7 +1285,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
* <li>Stop message delivery.</li>
* <li>Mark all messages that might have been delivered but not acknowledged as "redelivered".
* <li>Restart the delivery sequence including all unacknowledged messages that had been previously delivered.
- * Redelivered messages do not have to be delivered in exactly their original delivery order.</li>
+ * Redelivered messages do not have to be delivered in exactly their original delivery order.</li>
* </ul>
*
* <p/>If the recover operation is interrupted by a fail-over, between asking that the broker begin recovery and
@@ -1306,7 +1295,6 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
* @throws JMSException If the JMS provider fails to stop and restart message delivery due to some internal error.
* Not that this does not necessarily mean that the recovery has failed, but simply that it
* is not possible to tell if it has or not.
- *
* @todo Be aware of possible changes to parameter order as versions change.
*/
public void recover() throws JMSException
@@ -1343,15 +1331,15 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
{
// We can't use the BasicRecoverBody-OK method as it isn't part of the spec.
_connection.getProtocolHandler().writeFrame(BasicRecoverBody.createAMQFrame(_channelId,
- getProtocolMajorVersion(), getProtocolMinorVersion(), false)); // requeue
+ getProtocolMajorVersion(), getProtocolMinorVersion(), false)); // requeue
_logger.warn("Session Recover cannot be guaranteed with STRICT_AMQP. Messages may arrive out of order.");
}
else
{
_connection.getProtocolHandler().syncWrite(
- BasicRecoverBody.createAMQFrame(_channelId, getProtocolMajorVersion(), getProtocolMinorVersion(), false) // requeue
- , BasicRecoverOkBody.class);
+ BasicRecoverBody.createAMQFrame(_channelId, getProtocolMajorVersion(), getProtocolMinorVersion(), false) // requeue
+ , BasicRecoverOkBody.class);
}
if (!isSuspended)
@@ -1397,12 +1385,12 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
{
if (_logger.isDebugEnabled())
{
- _logger.debug("Rejecting delivery tag:" + deliveryTag);
+ _logger.debug("Rejecting delivery tag:" + deliveryTag + ":SessionHC:" + this.hashCode());
}
AMQFrame basicRejectBody =
- BasicRejectBody.createAMQFrame(_channelId, getProtocolMajorVersion(), getProtocolMinorVersion(), deliveryTag,
- requeue);
+ BasicRejectBody.createAMQFrame(_channelId, getProtocolMajorVersion(), getProtocolMinorVersion(), deliveryTag,
+ requeue);
_connection.getProtocolHandler().writeFrame(basicRejectBody);
}
@@ -1418,7 +1406,6 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
* @throws JMSException If the JMS provider fails to rollback the transaction due to some internal error. This does
* not mean that the rollback is known to have failed, merely that it is not known whether it
* failed or not.
- *
* @todo Be aware of possible changes to parameter order as versions change.
*/
public void rollback() throws JMSException
@@ -1442,7 +1429,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
}
_connection.getProtocolHandler().syncWrite(TxRollbackBody.createAMQFrame(_channelId,
- getProtocolMajorVersion(), getProtocolMinorVersion()), TxRollbackOkBody.class);
+ getProtocolMajorVersion(), getProtocolMinorVersion()), TxRollbackOkBody.class);
if (!isSuspended)
{
@@ -1521,7 +1508,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
else
{
_logger.warn("Unable to determine if subscription already exists for '" + name + "' for unsubscribe."
- + " Requesting queue deletion regardless.");
+ + " Requesting queue deletion regardless.");
}
deleteQueue(AMQTopic.getDurableTopicQueueName(name, _connection));
@@ -1542,8 +1529,8 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
}
protected MessageConsumer createConsumerImpl(final Destination destination, final int prefetchHigh,
- final int prefetchLow, final boolean noLocal, final boolean exclusive, String selector, final FieldTable rawSelector,
- final boolean noConsume, final boolean autoClose) throws JMSException
+ final int prefetchLow, final boolean noLocal, final boolean exclusive, String selector, final FieldTable rawSelector,
+ final boolean noConsume, final boolean autoClose) throws JMSException
{
checkTemporaryDestination(destination);
@@ -1586,9 +1573,9 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
}
BasicMessageConsumer consumer =
- new BasicMessageConsumer(_channelId, _connection, amqd, messageSelector, noLocal,
- _messageFactoryRegistry, AMQSession.this, protocolHandler, ft, prefetchHigh, prefetchLow,
- exclusive, _acknowledgeMode, noConsume, autoClose);
+ new BasicMessageConsumer(_channelId, _connection, amqd, messageSelector, noLocal,
+ _messageFactoryRegistry, AMQSession.this, protocolHandler, ft, prefetchHigh, prefetchLow,
+ exclusive, _acknowledgeMode, noConsume, autoClose);
if (_messageListener != null)
{
@@ -1608,7 +1595,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
catch (AMQInvalidRoutingKeyException e)
{
JMSException ide =
- new InvalidDestinationException("Invalid routing key:" + amqd.getRoutingKey().toString());
+ new InvalidDestinationException("Invalid routing key:" + amqd.getRoutingKey().toString());
ide.setLinkedException(e);
throw ide;
}
@@ -1690,30 +1677,29 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
* @return <tt>true</tt> if the queue is bound to the exchange and routing key, <tt>false</tt> if not.
*
* @throws JMSException If the query fails for any reason.
- *
* @todo Be aware of possible changes to parameter order as versions change.
*/
boolean isQueueBound(final AMQShortString exchangeName, final AMQShortString queueName, final AMQShortString routingKey)
- throws JMSException
+ throws JMSException
{
try
{
AMQMethodEvent response =
- new FailoverRetrySupport<AMQMethodEvent, AMQException>(
- new FailoverProtectedOperation<AMQMethodEvent, AMQException>()
- {
- public AMQMethodEvent execute() throws AMQException, FailoverException
- {
- AMQFrame boundFrame =
- ExchangeBoundBody.createAMQFrame(_channelId, getProtocolMajorVersion(),
- getProtocolMinorVersion(), exchangeName, // exchange
- queueName, // queue
- routingKey); // routingKey
+ new FailoverRetrySupport<AMQMethodEvent, AMQException>(
+ new FailoverProtectedOperation<AMQMethodEvent, AMQException>()
+ {
+ public AMQMethodEvent execute() throws AMQException, FailoverException
+ {
+ AMQFrame boundFrame =
+ ExchangeBoundBody.createAMQFrame(_channelId, getProtocolMajorVersion(),
+ getProtocolMinorVersion(), exchangeName, // exchange
+ queueName, // queue
+ routingKey); // routingKey
- return getProtocolHandler().syncWrite(boundFrame, ExchangeBoundOkBody.class);
+ return getProtocolHandler().syncWrite(boundFrame, ExchangeBoundOkBody.class);
- }
- }, _connection).execute();
+ }
+ }, _connection).execute();
// Extract and return the response code from the query.
ExchangeBoundOkBody responseBody = (ExchangeBoundOkBody) response.getMethod();
@@ -1763,10 +1749,9 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
* Starts the session, which ensures that it is not suspended and that its event dispatcher is running.
*
* @throws AMQException If the session cannot be started for any reason.
- *
* @todo This should be controlled by _stopped as it pairs with the stop method fixme or check the
- * FlowControlledBlockingQueue _queue to see if we have flow controlled. will result in sending Flow messages
- * for each subsequent call to flow.. only need to do this if we have called stop.
+ * FlowControlledBlockingQueue _queue to see if we have flow controlled. will result in sending Flow messages
+ * for each subsequent call to flow.. only need to do this if we have called stop.
*/
void start() throws AMQException
{
@@ -1783,9 +1768,16 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
}
}
- synchronized void startDistpatcherIfNecessary()
+ void startDistpatcherIfNecessary()
{
+ //If we are the dispatcher then we don't need to check we are started
+ if (Thread.currentThread() == _dispatcher)
+ {
+ return;
+ }
+
// If IMMEDIATE_PREFETCH is not set then we need to start fetching
+ // This is final per session so will be multi-thread safe.
if (!_immediatePrefetch)
{
// We do this now if this is the first call on a started connection
@@ -1922,14 +1914,14 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
if ((topic instanceof TemporaryDestination) && (((TemporaryDestination) topic).getSession() != this))
{
throw new javax.jms.InvalidDestinationException(
- "Cannot create a subscription on a temporary topic created in another session");
+ "Cannot create a subscription on a temporary topic created in another session");
}
if (!(topic instanceof AMQTopic))
{
throw new javax.jms.InvalidDestinationException(
- "Cannot create a subscription on topic created for another JMS Provider, class of topic provided is: "
- + topic.getClass().getName());
+ "Cannot create a subscription on topic created for another JMS Provider, class of topic provided is: "
+ + topic.getClass().getName());
}
return (AMQTopic) topic;
@@ -1942,11 +1934,6 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
*/
private void closeConsumers(Throwable error) throws JMSException
{
- if (_dispatcher != null)
- {
- _dispatcher.close();
- _dispatcher = null;
- }
// we need to clone the list of consumers since the close() method updates the _consumers collection
// which would result in a concurrent modification exception
final ArrayList<BasicMessageConsumer> clonedConsumers = new ArrayList<BasicMessageConsumer>(_consumers.values());
@@ -1961,10 +1948,15 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
}
else
{
- con.close();
+ con.close(false);
}
}
// at this point the _consumers map will be empty
+ if (_dispatcher != null)
+ {
+ _dispatcher.close();
+ _dispatcher = null;
+ }
}
/**
@@ -2029,7 +2021,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
* @param queueName
*/
private void consumeFromQueue(BasicMessageConsumer consumer, AMQShortString queueName,
- AMQProtocolHandler protocolHandler, boolean nowait, String messageSelector) throws AMQException, FailoverException
+ AMQProtocolHandler protocolHandler, boolean nowait, String messageSelector) throws AMQException, FailoverException
{
// need to generate a consumer tag on the client so we can exploit the nowait flag
AMQShortString tag = new AMQShortString(Integer.toString(_nextTag++));
@@ -2058,14 +2050,14 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
{
// TODO: Be aware of possible changes to parameter order as versions change.
AMQFrame jmsConsume =
- BasicConsumeBody.createAMQFrame(_channelId, getProtocolMajorVersion(), getProtocolMinorVersion(), arguments, // arguments
- tag, // consumerTag
- consumer.isExclusive(), // exclusive
- consumer.getAcknowledgeMode() == Session.NO_ACKNOWLEDGE, // noAck
- consumer.isNoLocal(), // noLocal
- nowait, // nowait
- queueName, // queue
- getTicket()); // ticket
+ BasicConsumeBody.createAMQFrame(_channelId, getProtocolMajorVersion(), getProtocolMinorVersion(), arguments, // arguments
+ tag, // consumerTag
+ consumer.isExclusive(), // exclusive
+ consumer.getAcknowledgeMode() == Session.NO_ACKNOWLEDGE, // noAck
+ consumer.isNoLocal(), // noLocal
+ nowait, // nowait
+ queueName, // queue
+ getTicket()); // ticket
if (nowait)
{
@@ -2085,13 +2077,13 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
}
private BasicMessageProducer createProducerImpl(Destination destination, boolean mandatory, boolean immediate)
- throws JMSException
+ throws JMSException
{
return createProducerImpl(destination, mandatory, immediate, false);
}
private BasicMessageProducer createProducerImpl(final Destination destination, final boolean mandatory,
- final boolean immediate, final boolean waitUntilSent) throws JMSException
+ final boolean immediate, final boolean waitUntilSent) throws JMSException
{
return new FailoverRetrySupport<BasicMessageProducer, JMSException>(
new FailoverProtectedOperation<BasicMessageProducer, JMSException>()
@@ -2101,8 +2093,8 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
checkNotClosed();
long producerId = getNextProducerId();
BasicMessageProducer producer =
- new BasicMessageProducer(_connection, (AMQDestination) destination, _transacted, _channelId,
- AMQSession.this, getProtocolHandler(), producerId, immediate, mandatory, waitUntilSent);
+ new BasicMessageProducer(_connection, (AMQDestination) destination, _transacted, _channelId,
+ AMQSession.this, getProtocolHandler(), producerId, immediate, mandatory, waitUntilSent);
registerProducer(producerId, producer);
return producer;
@@ -2126,33 +2118,32 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
* @param nowait
*
* @throws AMQException If the exchange cannot be declared for any reason.
- *
* @todo Be aware of possible changes to parameter order as versions change.
*/
private void declareExchange(final AMQShortString name, final AMQShortString type,
- final AMQProtocolHandler protocolHandler, final boolean nowait) throws AMQException
+ final AMQProtocolHandler protocolHandler, final boolean nowait) throws AMQException
{
new FailoverNoopSupport<Object, AMQException>(new FailoverProtectedOperation<Object, AMQException>()
+ {
+ public Object execute() throws AMQException, FailoverException
{
- public Object execute() throws AMQException, FailoverException
- {
- AMQFrame exchangeDeclare =
+ AMQFrame exchangeDeclare =
ExchangeDeclareBody.createAMQFrame(_channelId, getProtocolMajorVersion(), getProtocolMinorVersion(),
- null, // arguments
- false, // autoDelete
- false, // durable
- name, // exchange
- false, // internal
- nowait, // nowait
- false, // passive
- getTicket(), // ticket
- type); // type
-
- protocolHandler.syncWrite(exchangeDeclare, ExchangeDeclareOkBody.class);
-
- return null;
- }
- }, _connection).execute();
+ null, // arguments
+ false, // autoDelete
+ false, // durable
+ name, // exchange
+ false, // internal
+ nowait, // nowait
+ false, // passive
+ getTicket(), // ticket
+ type); // type
+
+ protocolHandler.syncWrite(exchangeDeclare, ExchangeDeclareOkBody.class);
+
+ return null;
+ }
+ }, _connection).execute();
}
/**
@@ -2171,13 +2162,11 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
* the client.
*
* @throws AMQException If the queue cannot be declared for any reason.
- *
* @todo Verify the destiation is valid or throw an exception.
- *
* @todo Be aware of possible changes to parameter order as versions change.
*/
private AMQShortString declareQueue(final AMQDestination amqd, final AMQProtocolHandler protocolHandler)
- throws AMQException
+ throws AMQException
{
/*return new FailoverRetrySupport<AMQShortString, AMQException>(*/
return new FailoverNoopSupport<AMQShortString, AMQException>(
@@ -2192,15 +2181,15 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
}
AMQFrame queueDeclare =
- QueueDeclareBody.createAMQFrame(_channelId, getProtocolMajorVersion(), getProtocolMinorVersion(),
- null, // arguments
- amqd.isAutoDelete(), // autoDelete
- amqd.isDurable(), // durable
- amqd.isExclusive(), // exclusive
- false, // nowait
- false, // passive
- amqd.getAMQQueueName(), // queue
- getTicket()); // ticket
+ QueueDeclareBody.createAMQFrame(_channelId, getProtocolMajorVersion(), getProtocolMinorVersion(),
+ null, // arguments
+ amqd.isAutoDelete(), // autoDelete
+ amqd.isDurable(), // durable
+ amqd.isExclusive(), // exclusive
+ false, // nowait
+ false, // passive
+ amqd.getAMQQueueName(), // queue
+ getTicket()); // ticket
protocolHandler.syncWrite(queueDeclare, QueueDeclareOkBody.class);
@@ -2217,7 +2206,6 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
* @param queueName The name of the queue to delete.
*
* @throws JMSException If the queue could not be deleted for any reason.
- *
* @todo Be aware of possible changes to parameter order as versions change.
*/
private void deleteQueue(final AMQShortString queueName) throws JMSException
@@ -2225,22 +2213,22 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
try
{
new FailoverRetrySupport<Object, AMQException>(new FailoverProtectedOperation<Object, AMQException>()
+ {
+ public Object execute() throws AMQException, FailoverException
{
- public Object execute() throws AMQException, FailoverException
- {
- AMQFrame queueDeleteFrame =
+ AMQFrame queueDeleteFrame =
QueueDeleteBody.createAMQFrame(_channelId, getProtocolMajorVersion(), getProtocolMinorVersion(),
- false, // ifEmpty
- false, // ifUnused
- true, // nowait
- queueName, // queue
- getTicket()); // ticket
+ false, // ifEmpty
+ false, // ifUnused
+ true, // nowait
+ queueName, // queue
+ getTicket()); // ticket
- getProtocolHandler().syncWrite(queueDeleteFrame, QueueDeleteOkBody.class);
+ getProtocolHandler().syncWrite(queueDeleteFrame, QueueDeleteOkBody.class);
- return null;
- }
- }, _connection).execute();
+ return null;
+ }
+ }, _connection).execute();
}
catch (AMQException e)
{
@@ -2359,7 +2347,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
{
suspendChannel(true);
_logger.info(
- "Prefetching delayed existing messages will not flow until requested via receive*() or setML().");
+ "Prefetching delayed existing messages will not flow until requested via receive*() or setML().");
}
catch (AMQException e)
{
@@ -2392,11 +2380,6 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
_producers.put(new Long(producerId), producer);
}
- private void rejectAllMessages(boolean requeue)
- {
- rejectMessagesForConsumerTag(null, requeue);
- }
-
/**
* @param consumerTag The consumerTag to prune from queue or all if null
* @param requeue Should the removed messages be requeued (or discarded. Possibly to DLQ)
@@ -2408,7 +2391,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
if (_logger.isInfoEnabled())
{
_logger.info("Rejecting messages from _queue for Consumer tag(" + consumerTag + ") (PDispatchQ) requeue:"
- + requeue);
+ + requeue);
if (messages.hasNext())
{
@@ -2428,7 +2411,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
if (_logger.isDebugEnabled())
{
_logger.debug("Removing message(" + System.identityHashCode(message) + ") from _queue DT:"
- + message.getDeliverBody().deliveryTag);
+ + message.getDeliverBody().deliveryTag);
}
messages.remove();
@@ -2469,44 +2452,44 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
private void returnBouncedMessage(final UnprocessedMessage message)
{
_connection.performConnectionTask(new Runnable()
+ {
+ public void run()
{
- public void run()
+ try
{
- try
- {
- // Bounced message is processed here, away from the mina thread
- AbstractJMSMessage bouncedMessage =
+ // Bounced message is processed here, away from the mina thread
+ AbstractJMSMessage bouncedMessage =
_messageFactoryRegistry.createMessage(0, false, message.getBounceBody().exchange,
- message.getBounceBody().routingKey, message.getContentHeader(), message.getBodies());
+ message.getBounceBody().routingKey, message.getContentHeader(), message.getBodies());
- AMQConstant errorCode = AMQConstant.getConstant(message.getBounceBody().replyCode);
- AMQShortString reason = message.getBounceBody().replyText;
- _logger.debug("Message returned with error code " + errorCode + " (" + reason + ")");
-
- // @TODO should this be moved to an exception handler of sorts. Somewhere errors are converted to correct execeptions.
- if (errorCode == AMQConstant.NO_CONSUMERS)
- {
- _connection.exceptionReceived(new AMQNoConsumersException("Error: " + reason, bouncedMessage));
- }
- else if (errorCode == AMQConstant.NO_ROUTE)
- {
- _connection.exceptionReceived(new AMQNoRouteException("Error: " + reason, bouncedMessage));
- }
- else
- {
- _connection.exceptionReceived(
- new AMQUndeliveredException(errorCode, "Error: " + reason, bouncedMessage));
- }
+ AMQConstant errorCode = AMQConstant.getConstant(message.getBounceBody().replyCode);
+ AMQShortString reason = message.getBounceBody().replyText;
+ _logger.debug("Message returned with error code " + errorCode + " (" + reason + ")");
+ // @TODO should this be moved to an exception handler of sorts. Somewhere errors are converted to correct execeptions.
+ if (errorCode == AMQConstant.NO_CONSUMERS)
+ {
+ _connection.exceptionReceived(new AMQNoConsumersException("Error: " + reason, bouncedMessage));
}
- catch (Exception e)
+ else if (errorCode == AMQConstant.NO_ROUTE)
{
- _logger.error(
+ _connection.exceptionReceived(new AMQNoRouteException("Error: " + reason, bouncedMessage));
+ }
+ else
+ {
+ _connection.exceptionReceived(
+ new AMQUndeliveredException(errorCode, "Error: " + reason, bouncedMessage));
+ }
+
+ }
+ catch (Exception e)
+ {
+ _logger.error(
"Caught exception trying to raise undelivered message exception (dump follows) - ignoring...",
e);
- }
}
- });
+ }
+ });
}
/**
@@ -2516,7 +2499,6 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
* should be unsuspended.
*
* @throws AMQException If the session cannot be suspended for any reason.
- *
* @todo Be aware of possible changes to parameter order as versions change.
*/
private void suspendChannel(boolean suspend) throws AMQException // , FailoverException
@@ -2533,8 +2515,8 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
_suspended = suspend;
AMQFrame channelFlowFrame =
- ChannelFlowBody.createAMQFrame(_channelId, getProtocolMajorVersion(), getProtocolMinorVersion(),
- !suspend);
+ ChannelFlowBody.createAMQFrame(_channelId, getProtocolMajorVersion(), getProtocolMinorVersion(),
+ !suspend);
_connection.getProtocolHandler().syncWrite(channelFlowFrame, ChannelFlowOkBody.class);
}
@@ -2545,14 +2527,21 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
}
}
+ Object getMessageDeliveryLock()
+ {
+ return _messageDeliveryLock;
+ }
+
/** Responsible for decoding a message fragment and passing it to the appropriate message consumer. */
private class Dispatcher extends Thread
{
/** Track the 'stopped' state of the dispatcher, a session starts in the stopped state. */
- private final AtomicBoolean _closed = new AtomicBoolean(false);
+ private final AtomicBoolean _dispatcherClosed = new AtomicBoolean(false);
private final Object _lock = new Object();
+ private final AtomicLong _rollbackMark = new AtomicLong(-1);
+ private String dispatcherID = "" + System.identityHashCode(this);
public Dispatcher()
{
@@ -2565,7 +2554,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
public void close()
{
- _closed.set(true);
+ _dispatcherClosed.set(true);
interrupt();
// fixme awaitTermination
@@ -2588,6 +2577,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
// Reject messages on pre-dispatch queue
rejectMessagesForConsumerTag(consumer.getConsumerTag(), true);
+ //Let the dispatcher deal with this when it gets to them.
// closeConsumer
consumer.markClosed();
@@ -2609,7 +2599,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
setConnectionStopped(true);
}
- rejectAllMessages(true);
+ _rollbackMark.set(_highestDeliveryTag.get());
_dispatcherLogger.debug("Session Pre Dispatch Queue cleared");
@@ -2621,8 +2611,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
}
else
{
- // should perhaps clear the _SQ here.
- // consumer._synchronousQueue.clear();
+ // cClear the _SQ here.
consumer.clearReceiveQueue();
}
@@ -2645,11 +2634,11 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
// Allow disptacher to start stopped
synchronized (_lock)
{
- while (connectionStopped())
+ while (!_closed.get() && connectionStopped())
{
try
{
- _lock.wait();
+ _lock.wait(2000);
}
catch (InterruptedException e)
{
@@ -2660,28 +2649,33 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
try
{
- while (!_closed.get() && ((message = (UnprocessedMessage) _queue.take()) != null))
+ while (!_dispatcherClosed.get())
{
- synchronized (_lock)
+ message = (UnprocessedMessage) _queue.poll(1000, TimeUnit.MILLISECONDS);
+ if (message != null)
{
-
- while (connectionStopped())
+ synchronized (_lock)
{
- _lock.wait();
- }
- synchronized(_messageDeliveryLock)
- {
- dispatchMessage(message);
- }
+ while (connectionStopped())
+ {
+ _lock.wait(2000);
+ }
- while (connectionStopped())
- {
- _lock.wait();
- }
+ if (message.getDeliverBody().deliveryTag <= _rollbackMark.get())
+ {
+ rejectMessage(message, true);
+ }
+ else
+ {
+ synchronized (_messageDeliveryLock)
+ {
+ dispatchMessage(message);
+ }
+ }
+ }
}
-
}
}
catch (InterruptedException e)
@@ -2713,7 +2707,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
if (_dispatcherLogger.isDebugEnabled())
{
_dispatcherLogger.debug("Set Dispatcher Connection " + (connectionStopped ? "Stopped" : "Started")
- + ": Currently " + (currently ? "Stopped" : "Started"));
+ + ": Currently " + (currently ? "Stopped" : "Started"));
}
}
@@ -2725,7 +2719,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
if (message.getDeliverBody() != null)
{
final BasicMessageConsumer consumer =
- (BasicMessageConsumer) _consumers.get(message.getDeliverBody().consumerTag);
+ (BasicMessageConsumer) _consumers.get(message.getDeliverBody().consumerTag);
if ((consumer == null) || consumer.isClosed())
{
@@ -2733,19 +2727,19 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
{
if (consumer == null)
{
- _dispatcherLogger.info("Received a message(" + System.identityHashCode(message) + ")" + "["
- + message.getDeliverBody().deliveryTag + "] from queue "
- + message.getDeliverBody().consumerTag + " )without a handler - rejecting(requeue)...");
+ _dispatcherLogger.info("Dispatcher(" + dispatcherID + ")Received a message(" + System.identityHashCode(message) + ")" + "["
+ + message.getDeliverBody().deliveryTag + "] from queue "
+ + message.getDeliverBody().consumerTag + " )without a handler - rejecting(requeue)...");
}
else
{
- _dispatcherLogger.info("Received a message(" + System.identityHashCode(message) + ")" + "["
- + message.getDeliverBody().deliveryTag + "] from queue " + " consumer("
- + consumer.debugIdentity() + ") is closed rejecting(requeue)...");
+ _dispatcherLogger.info("Dispatcher(" + dispatcherID + ")Received a message(" + System.identityHashCode(message) + ") ["
+ + message.getDeliverBody().deliveryTag + "] from queue consumer("
+ + consumer.debugIdentity() + ") is closed rejecting(requeue)...");
}
}
// Don't reject if we're already closing
- if (!_closed.get())
+ if (!_dispatcherClosed.get())
{
rejectMessage(message, true);
}
diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQTemporaryTopic.java b/java/client/src/main/java/org/apache/qpid/client/AMQTemporaryTopic.java
index 6c954ec3df..7b5781530b 100644
--- a/java/client/src/main/java/org/apache/qpid/client/AMQTemporaryTopic.java
+++ b/java/client/src/main/java/org/apache/qpid/client/AMQTemporaryTopic.java
@@ -24,6 +24,7 @@ import org.apache.qpid.framing.AMQShortString;
import javax.jms.JMSException;
import javax.jms.TemporaryTopic;
+import java.util.UUID;
/**
* AMQ implementation of TemporaryTopic.
@@ -38,7 +39,7 @@ class AMQTemporaryTopic extends AMQTopic implements TemporaryTopic, TemporaryDes
*/
public AMQTemporaryTopic(AMQSession session)
{
- super(session.getTemporaryTopicExchangeName(),new AMQShortString("TempQueue" + Long.toString(System.currentTimeMillis())));
+ super(session.getTemporaryTopicExchangeName(),new AMQShortString("tmp_" + UUID.randomUUID()));
_session = session;
}
diff --git a/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java b/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java
index dfac0d45a8..ddaf0cfd93 100644
--- a/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java
+++ b/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java
@@ -142,9 +142,9 @@ public class BasicMessageConsumer extends Closeable implements MessageConsumer
private List<StackTraceElement> _closedStack = null;
protected BasicMessageConsumer(int channelId, AMQConnection connection, AMQDestination destination,
- String messageSelector, boolean noLocal, MessageFactoryRegistry messageFactory, AMQSession session,
- AMQProtocolHandler protocolHandler, FieldTable rawSelectorFieldTable, int prefetchHigh, int prefetchLow,
- boolean exclusive, int acknowledgeMode, boolean noConsume, boolean autoClose)
+ String messageSelector, boolean noLocal, MessageFactoryRegistry messageFactory, AMQSession session,
+ AMQProtocolHandler protocolHandler, FieldTable rawSelectorFieldTable, int prefetchHigh, int prefetchLow,
+ boolean exclusive, int acknowledgeMode, boolean noConsume, boolean autoClose)
{
_channelId = channelId;
_connection = connection;
@@ -221,7 +221,7 @@ public class BasicMessageConsumer extends Closeable implements MessageConsumer
if (_logger.isDebugEnabled())
{
_logger.debug("Session stopped : Message listener(" + messageListener + ") set for destination "
- + _destination);
+ + _destination);
}
}
else
@@ -240,25 +240,38 @@ public class BasicMessageConsumer extends Closeable implements MessageConsumer
if (messageListener != null)
{
- // handle case where connection has already been started, and the dispatcher has alreaded started
+ //todo: handle case where connection has already been started, and the dispatcher has alreaded started
// putting values on the _synchronousQueue
- synchronized (_session)
- {
- _messageListener.set(messageListener);
- _session.setHasMessageListeners();
- _session.startDistpatcherIfNecessary();
- }
+ _messageListener.set(messageListener);
+ _session.setHasMessageListeners();
+ _session.startDistpatcherIfNecessary();
}
}
}
- private void preApplicationProcessing(AbstractJMSMessage jmsMsg) throws JMSException
+ private void preApplicationProcessing(AbstractJMSMessage msg) throws JMSException
{
- if (_session.getAcknowledgeMode() == Session.CLIENT_ACKNOWLEDGE)
+ switch (_acknowledgeMode)
{
- _unacknowledgedDeliveryTags.add(jmsMsg.getDeliveryTag());
+
+ case Session.CLIENT_ACKNOWLEDGE:
+ _unacknowledgedDeliveryTags.add(msg.getDeliveryTag());
+ break;
+
+ case Session.SESSION_TRANSACTED:
+ if (isNoConsume())
+ {
+ _session.acknowledgeMessage(msg.getDeliveryTag(), false);
+ }
+ else
+ {
+ _logger.info("Recording tag for commit:" + msg.getDeliveryTag());
+ _receivedDeliveryTags.add(msg.getDeliveryTag());
+ }
+
+ break;
}
_session.setInRecovery(false);
@@ -344,28 +357,49 @@ public class BasicMessageConsumer extends Closeable implements MessageConsumer
Object o = null;
if (l > 0)
{
- o = _synchronousQueue.poll(l, TimeUnit.MILLISECONDS);
+ long endtime = System.currentTimeMillis() + l;
+ while (System.currentTimeMillis() < endtime && o == null)
+ {
+ try
+ {
+ o = _synchronousQueue.poll(endtime - System.currentTimeMillis(), TimeUnit.MILLISECONDS);
+ }
+ catch (InterruptedException e)
+ {
+ _logger.warn("Interrupted: " + e);
+ if (isClosed())
+ {
+ return null;
+ }
+ }
+ }
}
else
{
- o = _synchronousQueue.take();
+ while (o == null)
+ {
+ try
+ {
+ o = _synchronousQueue.take();
+ }
+ catch (InterruptedException e)
+ {
+ _logger.warn("Interrupted: " + e);
+ if (isClosed())
+ {
+ return null;
+ }
+ }
+ }
}
-
final AbstractJMSMessage m = returnMessageOrThrow(o);
if (m != null)
{
preApplicationProcessing(m);
postDeliver(m);
}
-
return m;
}
- catch (InterruptedException e)
- {
- _logger.warn("Interrupted: " + e);
-
- return null;
- }
finally
{
releaseReceiving();
@@ -467,15 +501,14 @@ public class BasicMessageConsumer extends Closeable implements MessageConsumer
{
if (_logger.isTraceEnabled())
{
+ StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
if (_closedStack != null)
{
- _logger.trace(_consumerTag + " close():"
- + Arrays.asList(Thread.currentThread().getStackTrace()).subList(3, 6));
_logger.trace(_consumerTag + " previously:" + _closedStack.toString());
}
else
{
- _closedStack = Arrays.asList(Thread.currentThread().getStackTrace()).subList(3, 6);
+ _closedStack = Arrays.asList(stackTrace).subList(3, stackTrace.length - 1);
}
}
@@ -483,9 +516,9 @@ public class BasicMessageConsumer extends Closeable implements MessageConsumer
{
// TODO: Be aware of possible changes to parameter order as versions change.
final AMQFrame cancelFrame =
- BasicCancelBody.createAMQFrame(_channelId, _protocolHandler.getProtocolMajorVersion(),
- _protocolHandler.getProtocolMinorVersion(), _consumerTag, // consumerTag
- false); // nowait
+ BasicCancelBody.createAMQFrame(_channelId, _protocolHandler.getProtocolMajorVersion(),
+ _protocolHandler.getProtocolMinorVersion(), _consumerTag, // consumerTag
+ false); // nowait
try
{
@@ -540,15 +573,16 @@ public class BasicMessageConsumer extends Closeable implements MessageConsumer
if (_logger.isTraceEnabled())
{
+ StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
if (_closedStack != null)
{
_logger.trace(_consumerTag + " markClosed():"
- + Arrays.asList(Thread.currentThread().getStackTrace()).subList(3, 8));
+ + Arrays.asList(stackTrace).subList(3, stackTrace.length - 1));
_logger.trace(_consumerTag + " previously:" + _closedStack.toString());
}
else
{
- _closedStack = Arrays.asList(Thread.currentThread().getStackTrace()).subList(3, 8);
+ _closedStack = Arrays.asList(stackTrace).subList(3, stackTrace.length - 1);
}
}
}
@@ -575,9 +609,9 @@ public class BasicMessageConsumer extends Closeable implements MessageConsumer
try
{
AbstractJMSMessage jmsMessage =
- _messageFactory.createMessage(messageFrame.getDeliverBody().deliveryTag,
- messageFrame.getDeliverBody().redelivered, messageFrame.getDeliverBody().exchange,
- messageFrame.getDeliverBody().routingKey, messageFrame.getContentHeader(), messageFrame.getBodies());
+ _messageFactory.createMessage(messageFrame.getDeliverBody().deliveryTag,
+ messageFrame.getDeliverBody().redelivered, messageFrame.getDeliverBody().exchange,
+ messageFrame.getDeliverBody().routingKey, messageFrame.getContentHeader(), messageFrame.getBodies());
if (debug)
{
@@ -662,15 +696,15 @@ public class BasicMessageConsumer extends Closeable implements MessageConsumer
switch (_acknowledgeMode)
{
- case Session.PRE_ACKNOWLEDGE:
- _session.acknowledgeMessage(msg.getDeliveryTag(), false);
- break;
+ case Session.PRE_ACKNOWLEDGE:
+ _session.acknowledgeMessage(msg.getDeliveryTag(), false);
+ break;
- case Session.CLIENT_ACKNOWLEDGE:
- // we set the session so that when the user calls acknowledge() it can call the method on session
- // to send out the appropriate frame
- msg.setAMQSession(_session);
- break;
+ case Session.CLIENT_ACKNOWLEDGE:
+ // we set the session so that when the user calls acknowledge() it can call the method on session
+ // to send out the appropriate frame
+ msg.setAMQSession(_session);
+ break;
}
}
@@ -680,55 +714,43 @@ public class BasicMessageConsumer extends Closeable implements MessageConsumer
switch (_acknowledgeMode)
{
- case Session.CLIENT_ACKNOWLEDGE:
- if (isNoConsume())
- {
- _session.acknowledgeMessage(msg.getDeliveryTag(), false);
- }
-
- break;
-
- case Session.DUPS_OK_ACKNOWLEDGE:
- if (++_outstanding >= _prefetchHigh)
- {
- _dups_ok_acknowledge_send = true;
- }
+ case Session.CLIENT_ACKNOWLEDGE:
+ if (isNoConsume())
+ {
+ _session.acknowledgeMessage(msg.getDeliveryTag(), false);
+ }
- if (_outstanding <= _prefetchLow)
- {
- _dups_ok_acknowledge_send = false;
- }
+ break;
- if (_dups_ok_acknowledge_send)
- {
- if (!_session.isInRecovery())
+ case Session.DUPS_OK_ACKNOWLEDGE:
+ if (++_outstanding >= _prefetchHigh)
{
- _session.acknowledgeMessage(msg.getDeliveryTag(), true);
+ _dups_ok_acknowledge_send = true;
}
- }
- break;
+ if (_outstanding <= _prefetchLow)
+ {
+ _dups_ok_acknowledge_send = false;
+ }
- case Session.AUTO_ACKNOWLEDGE:
- // we do not auto ack a message if the application code called recover()
- if (!_session.isInRecovery())
- {
- _session.acknowledgeMessage(msg.getDeliveryTag(), false);
- }
+ if (_dups_ok_acknowledge_send)
+ {
+ if (!_session.isInRecovery())
+ {
+ _session.acknowledgeMessage(msg.getDeliveryTag(), true);
+ }
+ }
- break;
+ break;
- case Session.SESSION_TRANSACTED:
- if (isNoConsume())
- {
- _session.acknowledgeMessage(msg.getDeliveryTag(), false);
- }
- else
- {
- _receivedDeliveryTags.add(msg.getDeliveryTag());
- }
+ case Session.AUTO_ACKNOWLEDGE:
+ // we do not auto ack a message if the application code called recover()
+ if (!_session.isInRecovery())
+ {
+ _session.acknowledgeMessage(msg.getDeliveryTag(), false);
+ }
- break;
+ break;
}
}
@@ -757,15 +779,16 @@ public class BasicMessageConsumer extends Closeable implements MessageConsumer
_closed.set(true);
if (_logger.isTraceEnabled())
{
+ StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
if (_closedStack != null)
{
_logger.trace(_consumerTag + " notifyError():"
- + Arrays.asList(Thread.currentThread().getStackTrace()).subList(3, 8));
+ + Arrays.asList(stackTrace).subList(3, stackTrace.length - 1));
_logger.trace(_consumerTag + " previously" + _closedStack.toString());
}
else
{
- _closedStack = Arrays.asList(Thread.currentThread().getStackTrace()).subList(3, 8);
+ _closedStack = Arrays.asList(stackTrace).subList(3, stackTrace.length - 1);
}
}
}
@@ -860,6 +883,7 @@ public class BasicMessageConsumer extends Closeable implements MessageConsumer
if (_closeWhenNoMessages && _synchronousQueue.isEmpty() && _receiving.get() && (_messageListener != null))
{
+ _closed.set(true);
_receivingThread.interrupt();
}
@@ -915,6 +939,9 @@ public class BasicMessageConsumer extends Closeable implements MessageConsumer
Iterator iterator = _synchronousQueue.iterator();
+ int initialSize = _synchronousQueue.size();
+
+ boolean removed = false;
while (iterator.hasNext())
{
@@ -929,16 +956,24 @@ public class BasicMessageConsumer extends Closeable implements MessageConsumer
}
iterator.remove();
+ removed = true;
}
else
{
_logger.error("Queue contained a :" + o.getClass()
- + " unable to reject as it is not an AbstractJMSMessage. Will be cleared");
+ + " unable to reject as it is not an AbstractJMSMessage. Will be cleared");
iterator.remove();
+ removed = true;
}
}
+ if (removed && (initialSize == _synchronousQueue.size()))
+ {
+ _logger.error("Queue had content removed but didn't change in size." + initialSize);
+ }
+
+
if (_synchronousQueue.size() != 0)
{
_logger.warn("Queue was not empty after rejecting all messages Remaining:" + _synchronousQueue.size());
@@ -951,7 +986,7 @@ public class BasicMessageConsumer extends Closeable implements MessageConsumer
public String debugIdentity()
{
- return String.valueOf(_consumerTag);
+ return String.valueOf(_consumerTag) + "[" + System.identityHashCode(this) + "]";
}
public void clearReceiveQueue()
diff --git a/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java b/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
index 06446130b5..e7ff5afceb 100644
--- a/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
+++ b/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
@@ -24,6 +24,7 @@ import org.apache.mina.common.IdleStatus;
import org.apache.mina.common.IoHandlerAdapter;
import org.apache.mina.common.IoSession;
import org.apache.mina.filter.SSLFilter;
+import org.apache.mina.filter.codec.ProtocolCodecException;
import org.apache.mina.filter.codec.ProtocolCodecFilter;
import org.apache.qpid.AMQConnectionClosedException;
@@ -336,6 +337,20 @@ public class AMQProtocolHandler extends IoHandlerAdapter
sessionClosed(session);
}
+ else
+ {
+
+ if (cause instanceof ProtocolCodecException)
+ {
+ _logger.info("Protocol Exception caught NOT going to attempt failover as " +
+ "cause isn't AMQConnectionClosedException: " + cause, cause);
+
+ AMQException amqe = new AMQException("Protocol handler error: " + cause, cause);
+ propagateExceptionToWaiters(amqe);
+ _connection.exceptionReceived(cause);
+ }
+
+ }
// FIXME Need to correctly handle other exceptions. Things like ...
// if (cause instanceof AMQChannelClosedException)
@@ -684,7 +699,10 @@ public class AMQProtocolHandler extends IoHandlerAdapter
public void setStateManager(AMQStateManager stateManager)
{
_stateManager = stateManager;
- _protocolSession.setStateManager(stateManager);
+ if (_protocolSession != null)
+ {
+ _protocolSession.setStateManager(stateManager);
+ }
}
public AMQProtocolSession getProtocolSession()
diff --git a/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java b/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java
index 466395f7a3..5fe6ffe6c6 100644
--- a/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java
+++ b/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java
@@ -53,6 +53,7 @@ import javax.security.sasl.SaslClient;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
+import java.util.UUID;
/**
* Wrapper for protocol session that provides type-safe access to session attributes. <p/> The underlying protocol
@@ -411,14 +412,8 @@ public class AMQProtocolSession implements AMQVersionAwareProtocolSession
protected AMQShortString generateQueueName()
{
int id;
- synchronized (_queueIdLock)
- {
- id = _queueId++;
- }
- // get rid of / and : and ; from address for spec conformance
- String localAddress = StringUtils.replaceChars(_minaProtocolSession.getLocalAddress().toString(), "/;:", "");
- return new AMQShortString("tmp_" + localAddress + "_" + id);
+ return new AMQShortString("tmp_" + UUID.randomUUID());
}
/** @param delay delay in seconds (not ms) */
diff --git a/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java b/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java
index 86db9d5859..1badbb601c 100644
--- a/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java
+++ b/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java
@@ -20,6 +20,10 @@
*/
package org.apache.qpid.client.protocol;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.ReentrantLock;
+
import org.apache.qpid.AMQException;
import org.apache.qpid.AMQTimeoutException;
import org.apache.qpid.client.failover.FailoverException;
@@ -74,8 +78,21 @@ public abstract class BlockingMethodFrameListener implements AMQMethodListener
/** This flag is used to indicate that the blocked for method has been received. */
private volatile boolean _ready = false;
+ /** This flag is used to indicate that the received error has been processed. */
+ private volatile boolean _errorAck = false;
+
/** Used to protect the shared event and ready flag between the producer and consumer. */
- private final Object _lock = new Object();
+ private final ReentrantLock _lock = new ReentrantLock();
+
+ /**
+ * Used to signal that a method has been received
+ */
+ private final Condition _receivedCondition = _lock.newCondition();
+
+ /**
+ * Used to signal that a error has been processed
+ */
+ private final Condition _errorConditionAck = _lock.newCondition();
/** Used to hold the most recent exception that is passed to the {@link #error(Exception)} method. */
private volatile Exception _error;
@@ -126,11 +143,16 @@ public abstract class BlockingMethodFrameListener implements AMQMethodListener
// we only update the flag from inside the synchronized block
// so that the blockForFrame method cannot "miss" an update - it
// will only ever read the flag from within the synchronized block
- synchronized (_lock)
+ _lock.lock();
+ try
{
_doneEvt = evt;
_ready = ready;
- _lock.notify();
+ _receivedCondition.signal();
+ }
+ finally
+ {
+ _lock.unlock();
}
}
@@ -159,7 +181,11 @@ public abstract class BlockingMethodFrameListener implements AMQMethodListener
*/
public AMQMethodEvent blockForFrame(long timeout) throws AMQException, FailoverException
{
- synchronized (_lock)
+ long nanoTimeout = TimeUnit.MILLISECONDS.toNanos(timeout);
+
+ _lock.lock();
+
+ try
{
while (!_ready)
{
@@ -167,13 +193,13 @@ public abstract class BlockingMethodFrameListener implements AMQMethodListener
{
if (timeout == -1)
{
- _lock.wait();
+ _receivedCondition.await();
}
else
{
+ nanoTimeout = _receivedCondition.awaitNanos(nanoTimeout);
- _lock.wait(timeout);
- if (!_ready)
+ if (nanoTimeout <= 0 && !_ready && _error == null)
{
_error = new AMQTimeoutException("Server did not respond in a timely fashion");
_ready = true;
@@ -190,23 +216,32 @@ public abstract class BlockingMethodFrameListener implements AMQMethodListener
// }
}
}
- }
- if (_error != null)
- {
- if (_error instanceof AMQException)
- {
- throw (AMQException) _error;
- }
- else if (_error instanceof FailoverException)
- {
- // This should ensure that FailoverException is not wrapped and can be caught.
- throw (FailoverException) _error; // needed to expose FailoverException.
- }
- else
+
+ if (_error != null)
{
- throw new AMQException("Woken up due to " + _error.getClass(), _error);
+ if (_error instanceof AMQException)
+ {
+ throw (AMQException) _error;
+ }
+ else if (_error instanceof FailoverException)
+ {
+ // This should ensure that FailoverException is not wrapped and can be caught.
+ throw (FailoverException) _error; // needed to expose FailoverException.
+ }
+ else
+ {
+ throw new AMQException("Woken up due to " + _error.getClass(), _error);
+ }
}
+
+ }
+ finally
+ {
+ _errorAck = true;
+ _errorConditionAck.signal();
+ _error = null;
+ _lock.unlock();
}
return _doneEvt;
@@ -222,12 +257,55 @@ public abstract class BlockingMethodFrameListener implements AMQMethodListener
{
// set the error so that the thread that is blocking (against blockForFrame())
// can pick up the exception and rethrow to the caller
- _error = e;
- synchronized (_lock)
+
+ _lock.lock();
+
+ if (_error == null)
+ {
+ _error = e;
+ }
+ else
+ {
+ System.err.println("WARNING: new error arrived while old one not yet processed");
+ }
+
+ try
{
_ready = true;
- _lock.notify();
+ _receivedCondition.signal();
+
+ while (!_errorAck)
+ {
+ try
+ {
+ _errorConditionAck.await();
+ }
+ catch (InterruptedException e1)
+ {
+ //
+ }
+ }
+ _errorAck = false;
+ }
+ finally
+ {
+ _lock.unlock();
}
}
+
+ public boolean equals(Object o)
+ {
+
+ if (o instanceof BlockingMethodFrameListener)
+ {
+ BlockingMethodFrameListener other = (BlockingMethodFrameListener) o;
+
+ return _channelId == other._channelId;
+ }
+
+ return false;
+ }
+
+
}
diff --git a/java/client/src/main/java/org/apache/qpid/client/state/listener/SpecificMethodFrameListener.java b/java/client/src/main/java/org/apache/qpid/client/state/listener/SpecificMethodFrameListener.java
index 623591e0b6..4a4f4a0a38 100644
--- a/java/client/src/main/java/org/apache/qpid/client/state/listener/SpecificMethodFrameListener.java
+++ b/java/client/src/main/java/org/apache/qpid/client/state/listener/SpecificMethodFrameListener.java
@@ -36,6 +36,22 @@ public class SpecificMethodFrameListener extends BlockingMethodFrameListener
public boolean processMethod(int channelId, AMQMethodBody frame) //throws AMQException
{
+
+ //equiv to: (frame instanceof _expectedClass)
return _expectedClass.isInstance(frame);
}
+
+ public boolean equals(Object o)
+ {
+ if (o instanceof SpecificMethodFrameListener)
+ {
+ SpecificMethodFrameListener other = (SpecificMethodFrameListener) o;
+
+ // here we need to check if the two classes are the same.
+ return (_channelId == other._channelId) && (_expectedClass.equals(other._expectedClass));
+ }
+
+ return false;
+ }
+
}
diff --git a/java/client/src/main/java/org/apache/qpid/client/transport/TransportConnection.java b/java/client/src/main/java/org/apache/qpid/client/transport/TransportConnection.java
index 140eeaf2bb..1d0d6a3491 100644
--- a/java/client/src/main/java/org/apache/qpid/client/transport/TransportConnection.java
+++ b/java/client/src/main/java/org/apache/qpid/client/transport/TransportConnection.java
@@ -149,19 +149,21 @@ public class TransportConnection
{
int port = details.getPort();
- if (!_inVmPipeAddress.containsKey(port))
+ synchronized (_inVmPipeAddress)
{
- if (AutoCreate)
+ if (!_inVmPipeAddress.containsKey(port))
{
- createVMBroker(port);
- }
- else
- {
- throw new AMQVMBrokerCreationException(null, port, "VM Broker on port " + port
- + " does not exist. Auto create disabled.", null);
+ if (AutoCreate)
+ {
+ createVMBroker(port);
+ }
+ else
+ {
+ throw new AMQVMBrokerCreationException(null, port, "VM Broker on port " + port
+ + " does not exist. Auto create disabled.", null);
+ }
}
}
-
return new VmPipeTransportConnection(port);
}
@@ -176,69 +178,71 @@ public class TransportConnection
config.setThreadModel(ReadWriteThreadModel.getInstance());
}
- if (!_inVmPipeAddress.containsKey(port))
+ synchronized (_inVmPipeAddress)
{
- _logger.info("Creating InVM Qpid.AMQP listening on port " + port);
- IoHandlerAdapter provider = null;
- try
+ if (!_inVmPipeAddress.containsKey(port))
{
- VmPipeAddress pipe = new VmPipeAddress(port);
-
- provider = createBrokerInstance(port);
-
- _acceptor.bind(pipe, provider);
-
- _inVmPipeAddress.put(port, pipe);
- _logger.info("Created InVM Qpid.AMQP listening on port " + port);
- }
- catch (IOException e)
- {
- _logger.error("Got IOException.", e);
-
- // Try and unbind provider
+ _logger.info("Creating InVM Qpid.AMQP listening on port " + port);
+ IoHandlerAdapter provider = null;
try
{
VmPipeAddress pipe = new VmPipeAddress(port);
- try
- {
- _acceptor.unbind(pipe);
- }
- catch (Exception ignore)
- {
- // ignore
- }
-
- if (provider == null)
- {
- provider = createBrokerInstance(port);
- }
+ provider = createBrokerInstance(port);
_acceptor.bind(pipe, provider);
+
_inVmPipeAddress.put(port, pipe);
_logger.info("Created InVM Qpid.AMQP listening on port " + port);
}
- catch (IOException justUseFirstException)
+ catch (IOException e)
{
- String because;
- if (e.getCause() == null)
+ _logger.error("Got IOException.", e);
+
+ // Try and unbind provider
+ try
{
- because = e.toString();
+ VmPipeAddress pipe = new VmPipeAddress(port);
+
+ try
+ {
+ _acceptor.unbind(pipe);
+ }
+ catch (Exception ignore)
+ {
+ // ignore
+ }
+
+ if (provider == null)
+ {
+ provider = createBrokerInstance(port);
+ }
+
+ _acceptor.bind(pipe, provider);
+ _inVmPipeAddress.put(port, pipe);
+ _logger.info("Created InVM Qpid.AMQP listening on port " + port);
}
- else
+ catch (IOException justUseFirstException)
{
- because = e.getCause().toString();
- }
+ String because;
+ if (e.getCause() == null)
+ {
+ because = e.toString();
+ }
+ else
+ {
+ because = e.getCause().toString();
+ }
- throw new AMQVMBrokerCreationException(null, port, because + " Stopped binding of InVM Qpid.AMQP", e);
+ throw new AMQVMBrokerCreationException(null, port, because + " Stopped binding of InVM Qpid.AMQP", e);
+ }
}
}
+ else
+ {
+ _logger.info("InVM Qpid.AMQP on port " + port + " already exits.");
+ }
}
- else
- {
- _logger.info("InVM Qpid.AMQP on port " + port + " already exits.");
- }
-
}
private static IoHandlerAdapter createBrokerInstance(int port) throws AMQVMBrokerCreationException
@@ -285,25 +289,29 @@ public class TransportConnection
{
_logger.info("Killing all VM Brokers");
_acceptor.unbindAll();
-
- Iterator keys = _inVmPipeAddress.keySet().iterator();
-
- while (keys.hasNext())
+ synchronized (_inVmPipeAddress)
{
- int id = (Integer) keys.next();
- _inVmPipeAddress.remove(id);
- }
+ Iterator keys = _inVmPipeAddress.keySet().iterator();
+ while (keys.hasNext())
+ {
+ int id = (Integer) keys.next();
+ _inVmPipeAddress.remove(id);
+ }
+ }
}
public static void killVMBroker(int port)
{
- VmPipeAddress pipe = (VmPipeAddress) _inVmPipeAddress.get(port);
- if (pipe != null)
+ synchronized (_inVmPipeAddress)
{
- _logger.info("Killing VM Broker:" + port);
- _inVmPipeAddress.remove(port);
- _acceptor.unbind(pipe);
+ VmPipeAddress pipe = (VmPipeAddress) _inVmPipeAddress.get(port);
+ if (pipe != null)
+ {
+ _logger.info("Killing VM Broker:" + port);
+ _inVmPipeAddress.remove(port);
+ _acceptor.unbind(pipe);
+ }
}
}
diff --git a/java/client/src/main/java/org/apache/qpid/client/util/FlowControllingBlockingQueue.java b/java/client/src/main/java/org/apache/qpid/client/util/FlowControllingBlockingQueue.java
index 0fc39a9318..579b0d9e90 100644
--- a/java/client/src/main/java/org/apache/qpid/client/util/FlowControllingBlockingQueue.java
+++ b/java/client/src/main/java/org/apache/qpid/client/util/FlowControllingBlockingQueue.java
@@ -23,6 +23,7 @@ package org.apache.qpid.client.util;
import java.util.Iterator;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.TimeUnit;
/**
* A blocking queue that emits events above a user specified threshold allowing the caller to take action (e.g. flow
@@ -69,10 +70,10 @@ public class FlowControllingBlockingQueue
_listener = listener;
}
- public Object take() throws InterruptedException
+ public Object poll(long time, TimeUnit unit) throws InterruptedException
{
- Object o = _queue.take();
- if (_listener != null)
+ Object o = _queue.poll(time, unit);
+ if (o != null && _listener != null)
{
synchronized (_listener)
{
diff --git a/java/client/src/test/java/org/apache/mina/transport/vmpipe/support/VmPipeIdleStatusChecker.java b/java/client/src/test/java/org/apache/mina/transport/vmpipe/support/VmPipeIdleStatusChecker.java
new file mode 100644
index 0000000000..5323ad28bf
--- /dev/null
+++ b/java/client/src/test/java/org/apache/mina/transport/vmpipe/support/VmPipeIdleStatusChecker.java
@@ -0,0 +1,125 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.mina.transport.vmpipe.support;
+
+import org.apache.mina.common.IdleStatus;
+
+import java.util.HashMap;
+import java.util.IdentityHashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * This file is a patch to override MINA, because of the IdentityHashMap bug. Workaround to be supplied in MINA 1.0.7.
+ * This patched file will be removed once upgraded onto a newer MINA.
+ *
+ * Dectects idle sessions and fires <tt>sessionIdle</tt> events to them.
+ *
+ * @author The Apache Directory Project (mina-dev@directory.apache.org)
+ */
+public class VmPipeIdleStatusChecker
+{
+ private static final VmPipeIdleStatusChecker INSTANCE = new VmPipeIdleStatusChecker();
+
+ public static VmPipeIdleStatusChecker getInstance()
+ {
+ return INSTANCE;
+ }
+
+ private final Map sessions = new HashMap(); // will use as a set
+
+ private final Worker worker = new Worker();
+
+ private VmPipeIdleStatusChecker()
+ {
+ worker.start();
+ }
+
+ public void addSession(VmPipeSessionImpl session)
+ {
+ synchronized (sessions)
+ {
+ sessions.put(session, session);
+ }
+ }
+
+ private class Worker extends Thread
+ {
+ private Worker()
+ {
+ super("VmPipeIdleStatusChecker");
+ setDaemon(true);
+ }
+
+ public void run()
+ {
+ for (;;)
+ {
+ try
+ {
+ Thread.sleep(1000);
+ }
+ catch (InterruptedException e)
+ { }
+
+ long currentTime = System.currentTimeMillis();
+
+ synchronized (sessions)
+ {
+ Iterator it = sessions.keySet().iterator();
+ while (it.hasNext())
+ {
+ VmPipeSessionImpl session = (VmPipeSessionImpl) it.next();
+ if (!session.isConnected())
+ {
+ it.remove();
+ }
+ else
+ {
+ notifyIdleSession(session, currentTime);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void notifyIdleSession(VmPipeSessionImpl session, long currentTime)
+ {
+ notifyIdleSession0(session, currentTime, session.getIdleTimeInMillis(IdleStatus.BOTH_IDLE), IdleStatus.BOTH_IDLE,
+ Math.max(session.getLastIoTime(), session.getLastIdleTime(IdleStatus.BOTH_IDLE)));
+ notifyIdleSession0(session, currentTime, session.getIdleTimeInMillis(IdleStatus.READER_IDLE), IdleStatus.READER_IDLE,
+ Math.max(session.getLastReadTime(), session.getLastIdleTime(IdleStatus.READER_IDLE)));
+ notifyIdleSession0(session, currentTime, session.getIdleTimeInMillis(IdleStatus.WRITER_IDLE), IdleStatus.WRITER_IDLE,
+ Math.max(session.getLastWriteTime(), session.getLastIdleTime(IdleStatus.WRITER_IDLE)));
+ }
+
+ private void notifyIdleSession0(VmPipeSessionImpl session, long currentTime, long idleTime, IdleStatus status,
+ long lastIoTime)
+ {
+ if ((idleTime > 0) && (lastIoTime != 0) && ((currentTime - lastIoTime) >= idleTime))
+ {
+ session.increaseIdleCount(status);
+ session.getFilterChain().fireSessionIdle(session, status);
+ }
+ }
+
+}
diff --git a/java/client/src/test/java/org/apache/qpid/client/AMQQueueDeferredOrderingTest.java b/java/client/src/test/java/org/apache/qpid/client/AMQQueueDeferredOrderingTest.java
new file mode 100644
index 0000000000..fe418535d6
--- /dev/null
+++ b/java/client/src/test/java/org/apache/qpid/client/AMQQueueDeferredOrderingTest.java
@@ -0,0 +1,152 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.client;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.TextMessage;
+
+import junit.framework.TestCase;
+
+import org.apache.qpid.framing.AMQShortString;
+import org.apache.qpid.jms.Session;
+import org.apache.qpid.client.transport.TransportConnection;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This class tests all the alerts an AMQQueue can throw based on threshold
+ * values of different parameters
+ */
+public class AMQQueueDeferredOrderingTest extends TestCase
+{
+
+ private static final int NUM_MESSAGES = 1000;
+
+ private AMQConnection con;
+ private Session session;
+ private AMQQueue queue;
+ private MessageConsumer consumer;
+
+ private static final Logger _logger = LoggerFactory.getLogger(AMQQueueDeferredOrderingTest.class);
+
+ private ASyncProducer producerThread;
+ private static final String BROKER = "vm://:1";
+
+ private class ASyncProducer extends Thread
+ {
+
+ private MessageProducer producer;
+ private final Logger _logger = LoggerFactory.getLogger(ASyncProducer.class);
+ private Session session;
+ private int start;
+ private int end;
+
+ public ASyncProducer(AMQQueue q, int start, int end) throws Exception
+ {
+ this.session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ this._logger.info("Create Consumer of Q1");
+ this.producer = this.session.createProducer(q);
+ this.start = start;
+ this.end = end;
+ }
+
+ public void run()
+ {
+ try
+ {
+ this._logger.info("Starting to send messages");
+ for (int i = start; i < end && !interrupted(); i++)
+ {
+ producer.send(session.createTextMessage(Integer.toString(i)));
+ }
+ this._logger.info("Sent " + (end - start) + " messages");
+ }
+ catch (JMSException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ TransportConnection.createVMBroker(1);
+
+ _logger.info("Create Connection");
+ con = new AMQConnection(BROKER, "guest", "guest", "OrderingTest", "test");
+ _logger.info("Create Session");
+ session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ _logger.info("Create Q");
+ queue = new AMQQueue(session.getDefaultQueueExchangeName(), new AMQShortString("Q"), new AMQShortString("Q"),
+ false, true);
+ _logger.info("Create Consumer of Q");
+ consumer = session.createConsumer(queue);
+ _logger.info("Start Connection");
+ con.start();
+ }
+
+ public void testPausedOrder() throws Exception
+ {
+
+ // Setup initial messages
+ _logger.info("Creating first producer thread");
+ producerThread = new ASyncProducer(queue, 0, NUM_MESSAGES / 2);
+ producerThread.start();
+ // Wait for them to be done
+ producerThread.join();
+
+ // Setup second set of messages to produce while we consume
+ _logger.info("Creating second producer thread");
+ producerThread = new ASyncProducer(queue, NUM_MESSAGES / 2, NUM_MESSAGES);
+ producerThread.start();
+
+ // Start consuming and checking they're in order
+ _logger.info("Consuming messages");
+ for (int i = 0; i < NUM_MESSAGES; i++)
+ {
+ Message msg = consumer.receive(3000);
+ assertNotNull("Message should not be null", msg);
+ assertTrue("Message should be a text message", msg instanceof TextMessage);
+ assertEquals("Message content does not match expected", Integer.toString(i), ((TextMessage) msg).getText());
+ }
+ }
+
+ protected void tearDown() throws Exception
+ {
+ _logger.info("Interuptting producer thread");
+ producerThread.interrupt();
+ _logger.info("Closing connection");
+ con.close();
+
+ TransportConnection.killAllVMBrokers();
+ super.tearDown();
+ }
+
+ public static junit.framework.Test suite()
+ {
+ return new junit.framework.TestSuite(AMQQueueDeferredOrderingTest.class);
+ }
+
+}
diff --git a/java/client/src/test/java/org/apache/qpid/client/ResetMessageListenerTest.java b/java/client/src/test/java/org/apache/qpid/client/ResetMessageListenerTest.java
index 5f7ca69554..21f3e273aa 100644
--- a/java/client/src/test/java/org/apache/qpid/client/ResetMessageListenerTest.java
+++ b/java/client/src/test/java/org/apache/qpid/client/ResetMessageListenerTest.java
@@ -72,11 +72,14 @@ public class ResetMessageListenerTest extends TestCase
private final CountDownLatch _allFirstMessagesSent = new CountDownLatch(2); // all messages Sent Lock
private final CountDownLatch _allSecondMessagesSent = new CountDownLatch(2); // all messages Sent Lock
+ private String oldImmediatePrefetch;
+
protected void setUp() throws Exception
{
super.setUp();
TransportConnection.createVMBroker(1);
+ oldImmediatePrefetch = System.getProperty(AMQSession.IMMEDIATE_PREFETCH);
System.setProperty(AMQSession.IMMEDIATE_PREFETCH, "true");
InitialContextFactory factory = new PropertiesFileInitialContextFactory();
@@ -117,17 +120,16 @@ public class ResetMessageListenerTest extends TestCase
}
protected void tearDown() throws Exception
- {
- assertEquals("First batch of messages not received correctly", 0, _allFirstMessagesSent.getCount());
- assertEquals("Second batch of messages not received correctly", 0, _allSecondMessagesSent.getCount());
- assertEquals("Client 1 ML1 didn't get all messages", MSG_COUNT / 2, receivedCount1ML1);
- assertEquals("Client 2 didn't get all messages", MSG_COUNT, receivedCount2);
- assertEquals("Client 1 ML2 didn't get all messages", MSG_COUNT / 2, receivedCount1ML2);
-
+ {
_clientConnection.close();
-
_producerConnection.close();
+
super.tearDown();
+ if (oldImmediatePrefetch == null)
+ {
+ oldImmediatePrefetch = AMQSession.IMMEDIATE_PREFETCH_DEFAULT;
+ }
+ System.setProperty(AMQSession.IMMEDIATE_PREFETCH, oldImmediatePrefetch);
TransportConnection.killAllVMBrokers();
}
@@ -255,12 +257,17 @@ public class ResetMessageListenerTest extends TestCase
try
{
- _allSecondMessagesSent.await(1000, TimeUnit.MILLISECONDS);
+ _allSecondMessagesSent.await(5000, TimeUnit.MILLISECONDS);
}
catch (InterruptedException e)
{
// do nothing
}
+ assertEquals("First batch of messages not received correctly", 0, _allFirstMessagesSent.getCount());
+ assertEquals("Second batch of messages not received correctly", 0, _allSecondMessagesSent.getCount());
+ assertEquals("Client 1 ML1 didn't get all messages", MSG_COUNT / 2, receivedCount1ML1);
+ assertEquals("Client 2 didn't get all messages", MSG_COUNT, receivedCount2);
+ assertEquals("Client 1 ML2 didn't get all messages", MSG_COUNT / 2, receivedCount1ML2);
}
public static junit.framework.Test suite()
diff --git a/java/client/src/test/java/org/apache/qpid/client/SpecificMethodFrameListenerTest.java b/java/client/src/test/java/org/apache/qpid/client/SpecificMethodFrameListenerTest.java
new file mode 100644
index 0000000000..4cffcecf8a
--- /dev/null
+++ b/java/client/src/test/java/org/apache/qpid/client/SpecificMethodFrameListenerTest.java
@@ -0,0 +1,71 @@
+package org.apache.qpid.framing;
+
+import junit.framework.TestCase;
+import org.apache.qpid.client.state.listener.SpecificMethodFrameListener;
+import org.apache.mina.common.ByteBuffer;
+
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+
+public class SpecificMethodFrameListenerTest extends TestCase
+{
+
+ SpecificMethodFrameListener close1a = new SpecificMethodFrameListener(1, ChannelCloseOkBody.class);
+ SpecificMethodFrameListener close1b = new SpecificMethodFrameListener(1, ChannelCloseOkBody.class);
+ SpecificMethodFrameListener close2 = new SpecificMethodFrameListener(2, ChannelCloseOkBody.class);
+ SpecificMethodFrameListener open1a = new SpecificMethodFrameListener(1, ChannelOpenOkBody.class);
+ SpecificMethodFrameListener open1b = new SpecificMethodFrameListener(1, ChannelOpenOkBody.class);
+
+ public void testEquals()
+ {
+ //Check that the the same objects are equal
+ assertEquals("ChannelCloseOKBody a should equal a", close1a, close1a);
+ assertEquals("ChannelOpenOkBody a should equal a", open1a, open1a);
+
+ //check that the same values in differnt objects are equal
+ assertEquals("ChannelCloseOKBody b should equal a", close1b, close1a);
+ assertEquals("ChannelCloseOKBody a should equal b", close1a, close1b);
+ assertEquals("ChannelOpenOkBody a should equal b", open1a, open1b);
+ assertEquals("ChannelOpenOkBody a should equal b", open1a, open1b);
+
+ //Chec that different values fail
+ //Different channels
+ assertFalse("ChannelCloseOKBody channel 1 should NOT equal channel 2", close1a.equals(close2));
+ assertFalse("ChannelCloseOKBody channel 1 should NOT equal channel 2", close2.equals(close1a));
+
+ //Different Bodies
+ assertFalse("ChannelCloseOKBody should not equal ChannelOpenOkBody", close1a.equals(open1a));
+ assertFalse("ChannelOpenOkBody should not equal ChannelCloseOKBody", open1a.equals(close1a));
+ }
+
+ public void testProcessMethod() throws AMQFrameDecodingException
+ {
+ ChannelCloseOkBody ccob = (ChannelCloseOkBody) ChannelCloseOkBody.getFactory().newInstance((byte) 8, (byte) 0, ByteBuffer.allocate(0), 0);
+ ChannelOpenOkBody coob = (ChannelOpenOkBody) ChannelOpenOkBody.getFactory().newInstance((byte) 8, (byte) 0, ByteBuffer.allocate(0), 0);
+
+ assertTrue("This SpecificMethodFrameListener should process a ChannelCloseOkBody", close1a.processMethod(1, ccob));
+ assertFalse("This SpecificMethodFrameListener should NOT process a ChannelOpenOkBody", close1a.processMethod(1, coob));
+
+
+
+
+ }
+}
diff --git a/java/client/src/test/java/org/apache/qpid/test/unit/basic/LargeMessageTest.java b/java/client/src/test/java/org/apache/qpid/test/unit/basic/LargeMessageTest.java
index ffc7be82f0..03698b2ab2 100644
--- a/java/client/src/test/java/org/apache/qpid/test/unit/basic/LargeMessageTest.java
+++ b/java/client/src/test/java/org/apache/qpid/test/unit/basic/LargeMessageTest.java
@@ -68,6 +68,9 @@ public class LargeMessageTest extends TestCase
protected void tearDown() throws Exception
{
super.tearDown();
+ _session.close();
+ _connection.close();
+ TransportConnection.killAllVMBrokers();
}
private void init(AMQConnection connection) throws Exception
@@ -148,7 +151,7 @@ public class LargeMessageTest extends TestCase
producer.send(_session.createTextMessage(_messageText));
- TextMessage result = (TextMessage) consumer.receive(1000);
+ TextMessage result = (TextMessage) consumer.receive(10000);
assertNotNull("Null message recevied", result);
assertEquals("Message Size", _messageText.length(), result.getText().length());
diff --git a/java/client/src/test/java/org/apache/qpid/test/unit/basic/PubSubTwoConnectionTest.java b/java/client/src/test/java/org/apache/qpid/test/unit/basic/PubSubTwoConnectionTest.java
index 3aefc098aa..a3d0cf6dcd 100644
--- a/java/client/src/test/java/org/apache/qpid/test/unit/basic/PubSubTwoConnectionTest.java
+++ b/java/client/src/test/java/org/apache/qpid/test/unit/basic/PubSubTwoConnectionTest.java
@@ -48,6 +48,7 @@ public class PubSubTwoConnectionTest extends TestCase
protected void tearDown() throws Exception
{
super.tearDown();
+ TransportConnection.killAllVMBrokers();
}
/**
diff --git a/java/client/src/test/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseOkTest.java b/java/client/src/test/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseOkTest.java
index 6753ed48e4..559e9a4741 100644
--- a/java/client/src/test/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseOkTest.java
+++ b/java/client/src/test/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseOkTest.java
@@ -125,6 +125,7 @@ public class ChannelCloseOkTest extends TestCase
protected void tearDown() throws Exception
{
closeConnection();
+ TransportConnection.killAllVMBrokers();
super.tearDown();
}
diff --git a/java/client/src/test/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseTest.java b/java/client/src/test/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseTest.java
index 87984e8c49..f1099ca5ab 100644
--- a/java/client/src/test/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseTest.java
+++ b/java/client/src/test/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseTest.java
@@ -26,7 +26,10 @@ import org.apache.qpid.AMQException;
import org.apache.qpid.AMQTimeoutException;
import org.apache.qpid.client.AMQConnection;
import org.apache.qpid.client.failover.FailoverException;
+import org.apache.qpid.client.failover.FailoverProtectedOperation;
+import org.apache.qpid.client.failover.FailoverRetrySupport;
import org.apache.qpid.client.protocol.AMQProtocolSession;
+import org.apache.qpid.client.protocol.AMQProtocolHandler;
import org.apache.qpid.client.state.AMQStateManager;
import org.apache.qpid.client.transport.TransportConnection;
import org.apache.qpid.framing.AMQFrame;
@@ -60,7 +63,7 @@ public class ChannelCloseTest extends TestCase implements ExceptionListener, Con
Connection _connection;
private String _brokerlist = "vm://:1";
private Session _session;
- private static final long SYNC_TIMEOUT = 500;
+ private static final long SYNC_TIMEOUT = 5000;
private int TEST = 0;
protected void setUp() throws Exception
@@ -287,7 +290,7 @@ public class ChannelCloseTest extends TestCase implements ExceptionListener, Con
TEST++;
_logger.info("Test creating producer which will use channel id 1");
- Queue queue = _session.createQueue("CCT_test_validation_queue" + TEST);
+ Queue queue = _session.createTemporaryQueue();
MessageConsumer consumer = _session.createConsumer(queue);
@@ -311,7 +314,7 @@ public class ChannelCloseTest extends TestCase implements ExceptionListener, Con
connection.setConnectionListener(this);
- _session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
+ _session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
connection.start();
@@ -332,31 +335,42 @@ public class ChannelCloseTest extends TestCase implements ExceptionListener, Con
return connection;
}
- private void declareExchange(int channelId, String _type, String _name, boolean nowait)
- throws AMQException, FailoverException
+ private void declareExchange(final int channelId, final String _type, final String _name, final boolean nowait)
+ throws AMQException, FailoverException
{
- AMQFrame exchangeDeclare =
- ExchangeDeclareBody.createAMQFrame(channelId,
- ((AMQConnection) _connection).getProtocolHandler().getProtocolMajorVersion(),
- ((AMQConnection) _connection).getProtocolHandler().getProtocolMinorVersion(), null, // arguments
- false, // autoDelete
- false, // durable
- new AMQShortString(_name), // exchange
- false, // internal
- nowait, // nowait
- true, // passive
- 0, // ticket
- new AMQShortString(_type)); // type
-
- if (nowait)
- {
- ((AMQConnection) _connection).getProtocolHandler().writeFrame(exchangeDeclare);
- }
- else
- {
- ((AMQConnection) _connection).getProtocolHandler().syncWrite(exchangeDeclare, ExchangeDeclareOkBody.class,
- SYNC_TIMEOUT);
- }
+// new FailoverRetrySupport<Object, AMQException>(new FailoverProtectedOperation<Object, AMQException>()
+// {
+// public Object execute() throws AMQException, FailoverException
+// {
+
+ AMQProtocolHandler protocolHandler = ((AMQConnection) _connection).getProtocolHandler();
+
+ AMQFrame exchangeDeclare =
+ ExchangeDeclareBody.createAMQFrame(channelId,
+ protocolHandler.getProtocolMajorVersion(),
+ protocolHandler.getProtocolMinorVersion(), null, // arguments
+ false, // autoDelete
+ false, // durable
+ new AMQShortString(_name), // exchange
+ false, // internal
+ nowait, // nowait
+ true, // passive
+ 0, // ticket
+ new AMQShortString(_type)); // type
+
+ if (nowait)
+ {
+ protocolHandler.writeFrame(exchangeDeclare);
+ }
+ else
+ {
+ protocolHandler.syncWrite(exchangeDeclare, ExchangeDeclareOkBody.class, SYNC_TIMEOUT);
+ }
+
+// return null;
+// }
+// }, (AMQConnection)_connection).execute();
+
}
private void createChannel(int channelId) throws AMQException, FailoverException
@@ -375,10 +389,12 @@ public class ChannelCloseTest extends TestCase implements ExceptionListener, Con
}
public void bytesSent(long count)
- { }
+ {
+ }
public void bytesReceived(long count)
- { }
+ {
+ }
public boolean preFailover(boolean redirect)
{
@@ -391,5 +407,6 @@ public class ChannelCloseTest extends TestCase implements ExceptionListener, Con
}
public void failoverComplete()
- { }
+ {
+ }
}
diff --git a/java/client/src/test/java/org/apache/qpid/test/unit/client/connection/ConnectionStartTest.java b/java/client/src/test/java/org/apache/qpid/test/unit/client/connection/ConnectionStartTest.java
index ae8e2cfbda..1d108b9c5c 100644
--- a/java/client/src/test/java/org/apache/qpid/test/unit/client/connection/ConnectionStartTest.java
+++ b/java/client/src/test/java/org/apache/qpid/test/unit/client/connection/ConnectionStartTest.java
@@ -20,8 +20,11 @@
*/
package org.apache.qpid.test.unit.client.connection;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
+import junit.framework.TestCase;
+import org.apache.qpid.client.AMQConnection;
+import org.apache.qpid.client.AMQQueue;
+import org.apache.qpid.client.AMQSession;
+import org.apache.qpid.client.transport.TransportConnection;
import javax.jms.JMSException;
import javax.jms.Message;
@@ -30,14 +33,20 @@ import javax.jms.MessageListener;
import javax.jms.MessageProducer;
import javax.jms.Session;
import javax.jms.TextMessage;
+import javax.jms.Queue;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
-import junit.framework.TestCase;
-
-import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.client.AMQQueue;
-import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.client.transport.TransportConnection;
-
+/**
+ * ConnectionStartTest:
+ * This test verifies that a fresh connection is not started and no messages are delivered until the connection is
+ * started.
+ *
+ * After the connection is started then the message should be there, and the connection started.
+ *
+ * This Test verifies that using receive() and a messageListener does not cause message delivery before start is called.
+ *
+ */
public class ConnectionStartTest extends TestCase
{
@@ -54,11 +63,18 @@ public class ConnectionStartTest extends TestCase
try
{
+ // Create Consumer Connection
+ _connection = new AMQConnection(_broker, "guest", "guest", "fred", "test");
+ _consumerSess = _connection.createSession(false, AMQSession.AUTO_ACKNOWLEDGE);
- AMQConnection pubCon = new AMQConnection(_broker, "guest", "guest", "fred", "test");
+ Queue queue = _consumerSess.createQueue("ConnectionStartTest");
+
+ _consumer = _consumerSess.createConsumer(queue);
- AMQQueue queue = new AMQQueue(pubCon,"ConnectionStartTest");
+
+ // Create Producer Connection to send message
+ AMQConnection pubCon = new AMQConnection(_broker, "guest", "guest", "fred", "test");
Session pubSess = pubCon.createSession(false, AMQSession.AUTO_ACKNOWLEDGE);
@@ -66,12 +82,6 @@ public class ConnectionStartTest extends TestCase
pub.send(pubSess.createTextMessage("Initial Message"));
- _connection = new AMQConnection(_broker, "guest", "guest", "fred", "test");
-
- _consumerSess = _connection.createSession(false, AMQSession.AUTO_ACKNOWLEDGE);
-
- _consumer = _consumerSess.createConsumer(queue);
-
pubCon.close();
}
@@ -85,6 +95,7 @@ public class ConnectionStartTest extends TestCase
{
_connection.close();
TransportConnection.killVMBroker(1);
+ super.tearDown();
}
public void testSimpleReceiveConnection()
@@ -94,9 +105,9 @@ public class ConnectionStartTest extends TestCase
assertTrue("Connection should not be started", !_connection.started());
//Note that this next line will start the dispatcher in the session
// should really not be called before _connection start
- assertTrue("There should not be messages waiting for the consumer", _consumer.receiveNoWait() == null);
+ assertNull("There should not be messages waiting for the consumer", _consumer.receiveNoWait());
_connection.start();
- assertTrue("There should be messages waiting for the consumer", _consumer.receiveNoWait() == null);
+ assertNotNull("There should be messages waiting for the consumer", _consumer.receive(1000));
assertTrue("Connection should be started", _connection.started());
}
@@ -131,7 +142,11 @@ public class ConnectionStartTest extends TestCase
}
});
+ // Ensure that setting a ML doesn't start the connection
assertTrue("Connection should not be started", !_connection.started());
+ // Ensure that the message wasn't delivered while the connection was stopped.
+ assertEquals("Message latch should still be set",1,_gotMessage.getCount());
+
_connection.start();
assertTrue("Connection should be started", _connection.started());
diff --git a/java/client/src/test/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java b/java/client/src/test/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java
index 588c82221e..56394fee27 100644
--- a/java/client/src/test/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java
+++ b/java/client/src/test/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java
@@ -47,12 +47,12 @@ public class ConnectionTest extends TestCase
protected void setUp() throws Exception
{
super.setUp();
-// TransportConnection.createVMBroker(1);
+ TransportConnection.createVMBroker(1);
}
protected void tearDown() throws Exception
{
-// TransportConnection.killVMBroker(1);
+ TransportConnection.killVMBroker(1);
}
public void testSimpleConnection()
diff --git a/java/client/src/test/java/org/apache/qpid/test/unit/client/protocol/AMQProtocolSessionTest.java b/java/client/src/test/java/org/apache/qpid/test/unit/client/protocol/AMQProtocolSessionTest.java
deleted file mode 100644
index 3776ff767f..0000000000
--- a/java/client/src/test/java/org/apache/qpid/test/unit/client/protocol/AMQProtocolSessionTest.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.test.unit.client.protocol;
-
-import junit.framework.TestCase;
-
-import org.apache.mina.common.IoSession;
-import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.client.protocol.AMQProtocolHandler;
-import org.apache.qpid.client.protocol.AMQProtocolSession;
-import org.apache.qpid.framing.AMQShortString;
-
-public class AMQProtocolSessionTest extends TestCase
-{
- private static class AMQProtSession extends AMQProtocolSession
- {
-
- public AMQProtSession(AMQProtocolHandler protocolHandler, IoSession protocolSession, AMQConnection connection)
- {
- super(protocolHandler,protocolSession,connection);
- }
-
- public TestIoSession getMinaProtocolSession()
- {
- return (TestIoSession) _minaProtocolSession;
- }
-
- public AMQShortString genQueueName()
- {
- return generateQueueName();
- }
- }
-
- //private Strings for test values and expected results
- private String _brokenAddress;
- private String _generatedAddress;
- private String _emptyAddress;
- private String _generatedAddress_2;
- private String _validAddress;
- private String _generatedAddress_3;
- private int _port;
- private AMQProtSession _testSession;
-
- protected void setUp() throws Exception
- {
- super.setUp();
-
- //don't care about the values set here apart from the dummy IoSession
- _testSession = new AMQProtSession(null,new TestIoSession(),null);
-
- //initialise addresses for test and expected results
- _port = 123;
- _brokenAddress = "tcp://myAddress;:";
- _generatedAddress = "tmp_tcpmyAddress123_1";
- _emptyAddress = "";
- _generatedAddress_2 = "tmp_localhost127.0.0.1123_2";
- _validAddress = "abc";
- _generatedAddress_3 = "tmp_abc123_3";
- }
-
- public void testGenerateQueueName()
- {
- AMQShortString testAddress;
-
- //test address with / and ; chars which generateQueueName should removeKey
- _testSession.getMinaProtocolSession().setStringLocalAddress(_brokenAddress);
- _testSession.getMinaProtocolSession().setLocalPort(_port);
-
- testAddress = _testSession.genQueueName();
- assertEquals("Failure when generating a queue exchange from an address with special chars",_generatedAddress,testAddress.toString());
-
- //test empty address
- _testSession.getMinaProtocolSession().setStringLocalAddress(_emptyAddress);
-
- testAddress = _testSession.genQueueName();
- assertEquals("Failure when generating a queue exchange from an empty address",_generatedAddress_2,testAddress.toString());
-
- //test address with no special chars
- _testSession.getMinaProtocolSession().setStringLocalAddress(_validAddress);
-
- testAddress = _testSession.genQueueName();
- assertEquals("Failure when generating a queue exchange from an address with no special chars",_generatedAddress_3,testAddress.toString());
-
- }
-
- protected void tearDown() throws Exception
- {
- _testSession = null;
- _brokenAddress = null;
- _generatedAddress = null;
- _emptyAddress = null;
- _generatedAddress_2 = null;
- _validAddress = null;
- _generatedAddress_3 = null;
- super.tearDown();
- }
-
- public static junit.framework.Test suite()
- {
- return new junit.framework.TestSuite(AMQProtocolSessionTest.class);
- }
-}
diff --git a/java/client/src/test/java/org/apache/qpid/test/unit/close/MessageRequeueTest.java b/java/client/src/test/java/org/apache/qpid/test/unit/close/MessageRequeueTest.java
index a297011acd..bf8802c803 100644
--- a/java/client/src/test/java/org/apache/qpid/test/unit/close/MessageRequeueTest.java
+++ b/java/client/src/test/java/org/apache/qpid/test/unit/close/MessageRequeueTest.java
@@ -32,7 +32,6 @@ import org.apache.qpid.url.URLSyntaxException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.jms.Connection;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
@@ -40,6 +39,7 @@ import javax.jms.Queue;
import javax.jms.Session;
import java.util.concurrent.atomic.AtomicInteger;
+import java.util.UUID;
public class MessageRequeueTest extends TestCase
{
@@ -50,7 +50,7 @@ public class MessageRequeueTest extends TestCase
protected final int consumeTimeout = 3000;
- protected final String queue = "direct://amq.direct//queue";
+
protected String payload = "Message:";
protected final String BROKER = "vm://:1";
@@ -64,32 +64,13 @@ public class MessageRequeueTest extends TestCase
super.setUp();
TransportConnection.createVMBroker(1);
- QpidClientConnection conn = new QpidClientConnection(BROKER);
- conn.connect();
- // clear queue
- conn.consume(queue, consumeTimeout);
- // load test data
- _logger.info("creating test data, " + numTestMessages + " messages");
- conn.put(queue, payload, numTestMessages);
- // close this connection
- conn.disconnect();
}
protected void tearDown() throws Exception
{
super.tearDown();
- if (!passed) // clean up
- {
- QpidClientConnection conn = new QpidClientConnection(BROKER);
-
- conn.connect();
- // clear queue
- conn.consume(queue, consumeTimeout);
-
- conn.disconnect();
- }
TransportConnection.killVMBroker(1);
}
@@ -102,12 +83,25 @@ public class MessageRequeueTest extends TestCase
*/
public void testDrain() throws JMSException, InterruptedException
{
+ final String queueName = "direct://amq.direct//queue" + UUID.randomUUID().toString();
+
QpidClientConnection conn = new QpidClientConnection(BROKER);
conn.connect();
+ // clear queue
+ conn.consume(queueName, consumeTimeout);
+ // load test data
+ _logger.info("creating test data, " + numTestMessages + " messages");
+ conn.put(queueName, payload, numTestMessages);
+ // close this connection
+ conn.disconnect();
- _logger.info("consuming queue " + queue);
- Queue q = conn.getSession().createQueue(queue);
+ conn = new QpidClientConnection(BROKER);
+
+ conn.connect();
+
+ _logger.info("consuming queue " + queueName);
+ Queue q = conn.getSession().createQueue(queueName);
final MessageConsumer consumer = conn.getSession().createConsumer(q);
int messagesReceived = 0;
@@ -173,17 +167,33 @@ public class MessageRequeueTest extends TestCase
_logger.info("consumed: " + messagesReceived);
conn.disconnect();
passed = true;
+
}
+
+
/** multiple consumers
* Based on code subbmitted by client FT-304
*/
- public void testTwoCompetingConsumers()
+ public void testCompetingConsumers() throws JMSException, InterruptedException
{
- Consumer c1 = new Consumer();
- Consumer c2 = new Consumer();
- Consumer c3 = new Consumer();
- Consumer c4 = new Consumer();
+ final String queueName = "direct://amq.direct//queue" + UUID.randomUUID().toString();
+
+ QpidClientConnection conn = new QpidClientConnection(BROKER);
+
+ conn.connect();
+ // clear queue
+ conn.consume(queueName, consumeTimeout);
+ // load test data
+ _logger.info("creating test data, " + numTestMessages + " messages");
+ conn.put(queueName, payload, numTestMessages);
+ // close this connection
+ conn.disconnect();
+
+ Consumer c1 = new Consumer(queueName);
+ Consumer c2 = new Consumer(queueName);
+ Consumer c3 = new Consumer(queueName);
+ Consumer c4 = new Consumer(queueName);
Thread t1 = new Thread(c1);
Thread t2 = new Thread(c2);
@@ -193,7 +203,7 @@ public class MessageRequeueTest extends TestCase
t1.start();
t2.start();
t3.start();
- // t4.start();
+ t4.start();
try
{
@@ -224,7 +234,7 @@ public class MessageRequeueTest extends TestCase
{
if ((b == 0) && (index != 0)) // delivery tag of zero shouldn't exist (and we don't have msg 0)
{
- _logger.error("Index: " + index + " was not received.");
+ fail("Index: " + index + " was not received.");
list.append(" ");
list.append(index);
list.append(":");
@@ -236,17 +246,19 @@ public class MessageRequeueTest extends TestCase
}
assertEquals(list.toString() + "-" + numTestMessages + "-" + totalConsumed, 0, failed);
- assertEquals("number of consumed messages does not match initial data", numTestMessages, totalConsumed);
- passed = true;
+ assertTrue("number of consumed messages does not match initial data: " + totalConsumed, numTestMessages <= totalConsumed);
+
}
class Consumer implements Runnable
{
private Integer count = 0;
private Integer id;
+ private final String _queueName;
- public Consumer()
+ public Consumer(String queueName)
{
+ _queueName = queueName;
id = consumerIds.addAndGet(1);
}
@@ -263,7 +275,7 @@ public class MessageRequeueTest extends TestCase
Message result;
do
{
- result = conn.getNextMessage(queue, consumeTimeout);
+ result = conn.getNextMessage(_queueName, consumeTimeout);
if (result != null)
{
@@ -322,8 +334,21 @@ public class MessageRequeueTest extends TestCase
}
}
- public void testRequeue() throws JMSException, AMQException, URLSyntaxException
+ public void testRequeue() throws JMSException, AMQException, URLSyntaxException, InterruptedException
{
+ final String queue = "direct://amq.direct//queue" + UUID.randomUUID().toString();
+
+ QpidClientConnection conn = new QpidClientConnection(BROKER);
+
+ conn.connect();
+ // clear queue
+ conn.consume(queue, consumeTimeout);
+ // load test data
+ _logger.info("creating test data, " + numTestMessages + " messages");
+ conn.put(queue, payload, numTestMessages);
+ // close this connection
+ conn.disconnect();
+
int run = 0;
// while (run < 10)
{
@@ -338,14 +363,14 @@ public class MessageRequeueTest extends TestCase
String brokerlist = BROKER;
String brokerUrl = "amqp://guest:guest@" + virtualHost + "?brokerlist='" + brokerlist + "'";
- Connection conn = new AMQConnection(brokerUrl);
- Session session = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE);
+ AMQConnection amqConn = new AMQConnection(brokerUrl);
+ Session session = amqConn.createSession(false, Session.CLIENT_ACKNOWLEDGE);
Queue q = session.createQueue(queue);
_logger.debug("Create Consumer");
MessageConsumer consumer = session.createConsumer(q);
- conn.start();
+ amqConn.start();
_logger.debug("Receiving msg");
Message msg = consumer.receive(2000);
@@ -357,7 +382,7 @@ public class MessageRequeueTest extends TestCase
consumer.close();
_logger.debug("Close Connection");
- conn.close();
+ amqConn.close();
}
}
diff --git a/java/client/src/test/java/org/apache/qpid/test/unit/topic/DurableSubscriptionTest.java b/java/client/src/test/java/org/apache/qpid/test/unit/topic/DurableSubscriptionTest.java
index c8d43a47a5..a0a8eb10ed 100644
--- a/java/client/src/test/java/org/apache/qpid/test/unit/topic/DurableSubscriptionTest.java
+++ b/java/client/src/test/java/org/apache/qpid/test/unit/topic/DurableSubscriptionTest.java
@@ -114,18 +114,28 @@ public class DurableSubscriptionTest extends TestCase
con.close();
}
- public void testDurability() throws AMQException, JMSException, URLSyntaxException
+ public void testDurabilityNOACK() throws AMQException, JMSException, URLSyntaxException
+ {
+ durabilityImpl(AMQSession.NO_ACKNOWLEDGE);
+ }
+
+ public void testDurabilityAUTOACK() throws AMQException, JMSException, URLSyntaxException
+ {
+ durabilityImpl(Session.AUTO_ACKNOWLEDGE);
+ }
+
+ private void durabilityImpl(int ackMode) throws AMQException, JMSException, URLSyntaxException
{
AMQConnection con = new AMQConnection("vm://:1", "guest", "guest", "test", "test");
AMQTopic topic = new AMQTopic(con, "MyTopic");
- Session session1 = con.createSession(false, AMQSession.NO_ACKNOWLEDGE);
+ Session session1 = con.createSession(false, ackMode);
MessageConsumer consumer1 = session1.createConsumer(topic);
- Session sessionProd = con.createSession(false, AMQSession.NO_ACKNOWLEDGE);
+ Session sessionProd = con.createSession(false, ackMode);
MessageProducer producer = sessionProd.createProducer(topic);
- Session session2 = con.createSession(false, AMQSession.NO_ACKNOWLEDGE);
+ Session session2 = con.createSession(false, ackMode);
TopicSubscriber consumer2 = session2.createDurableSubscriber(topic, "MySubscription");
con.start();
@@ -133,37 +143,45 @@ public class DurableSubscriptionTest extends TestCase
producer.send(session1.createTextMessage("A"));
Message msg;
- msg = consumer1.receive();
- assertEquals("A", ((TextMessage) msg).getText());
- msg = consumer1.receive(100);
- assertEquals(null, msg);
+ msg = consumer1.receive(500);
+ assertNotNull("Message should be available", msg);
+ assertEquals("Message Text doesn't match", "A", ((TextMessage) msg).getText());
+
+ msg = consumer1.receive(500);
+ assertNull("There should be no more messages for consumption on consumer1.", msg);
msg = consumer2.receive();
- assertEquals("A", ((TextMessage) msg).getText());
- msg = consumer2.receive(100);
- assertEquals(null, msg);
+ assertNotNull(msg);
+ assertEquals("Consumer 2 should also received the first msg.", "A", ((TextMessage) msg).getText());
+ msg = consumer2.receive(500);
+ assertNull("There should be no more messages for consumption on consumer2.", msg);
consumer2.close();
- Session session3 = con.createSession(false, AMQSession.NO_ACKNOWLEDGE);
+ Session session3 = con.createSession(false, ackMode);
MessageConsumer consumer3 = session3.createDurableSubscriber(topic, "MySubscription");
producer.send(session1.createTextMessage("B"));
_logger.info("Receive message on consumer 1 :expecting B");
- msg = consumer1.receive(100);
- assertEquals("B", ((TextMessage) msg).getText());
+ msg = consumer1.receive(500);
+ assertNotNull("Consumer 1 should get message 'B'.", msg);
+ assertEquals("Incorrect Message recevied on consumer1.", "B", ((TextMessage) msg).getText());
_logger.info("Receive message on consumer 1 :expecting null");
- msg = consumer1.receive(100);
- assertEquals(null, msg);
+ msg = consumer1.receive(500);
+ assertNull("There should be no more messages for consumption on consumer1.", msg);
_logger.info("Receive message on consumer 3 :expecting B");
- msg = consumer3.receive(100);
- assertEquals("B", ((TextMessage) msg).getText());
+ msg = consumer3.receive(500);
+ assertNotNull("Consumer 3 should get message 'B'.", msg);
+ assertEquals("Incorrect Message recevied on consumer4.", "B", ((TextMessage) msg).getText());
_logger.info("Receive message on consumer 3 :expecting null");
- msg = consumer3.receive(100);
- assertEquals(null, msg);
-
+ msg = consumer3.receive(500);
+ assertNull("There should be no more messages for consumption on consumer3.", msg);
+
+ consumer1.close();
+ consumer3.close();
+
con.close();
}
diff --git a/java/client/src/test/java/org/apache/qpid/test/unit/topic/TopicSessionTest.java b/java/client/src/test/java/org/apache/qpid/test/unit/topic/TopicSessionTest.java
index a19687b07c..065b06a87d 100644
--- a/java/client/src/test/java/org/apache/qpid/test/unit/topic/TopicSessionTest.java
+++ b/java/client/src/test/java/org/apache/qpid/test/unit/topic/TopicSessionTest.java
@@ -308,15 +308,15 @@ public class TopicSessionTest extends TestCase
publisher.publish(session1.createTextMessage("hello-new2"));
//test normal subscriber gets message
- m = (TextMessage) normal.receive(1000);
+ m = (TextMessage) normal.receive(5000);
assertNotNull(m);
//test selector subscriber doesn't message
- m = (TextMessage) select.receive(1000);
+ m = (TextMessage) select.receive(2000);
assertNull(m);
//test nolocal subscriber doesn't message
- m = (TextMessage) noLocal.receive(1000);
+ m = (TextMessage) noLocal.receive(2000);
if (m != null)
{
System.out.println("Message:" + m.getText());
@@ -330,15 +330,15 @@ public class TopicSessionTest extends TestCase
publisher.publish(message);
//test normal subscriber gets message
- m = (TextMessage) normal.receive(1000);
+ m = (TextMessage) normal.receive(5000);
assertNotNull(m);
//test selector subscriber does get message
- m = (TextMessage) select.receive(100);
+ m = (TextMessage) select.receive(2000);
assertNotNull(m);
//test nolocal subscriber doesn't message
- m = (TextMessage) noLocal.receive(100);
+ m = (TextMessage) noLocal.receive(1000);
assertNull(m);
AMQConnection con2 = new AMQConnection(BROKER + "?retries='0'", "guest", "guest", "test2", "test");
@@ -352,15 +352,15 @@ public class TopicSessionTest extends TestCase
publisher2.publish(message);
//test normal subscriber gets message
- m = (TextMessage) normal.receive(1000);
+ m = (TextMessage) normal.receive(2000);
assertNotNull(m);
//test selector subscriber does get message
- m = (TextMessage) select.receive(100);
+ m = (TextMessage) select.receive(2000);
assertNotNull(m);
//test nolocal subscriber does message
- m = (TextMessage) noLocal.receive(100);
+ m = (TextMessage) noLocal.receive(2000);
assertNotNull(m);
diff --git a/java/client/src/test/java/org/apache/qpid/test/unit/transacted/CommitRollbackTest.java b/java/client/src/test/java/org/apache/qpid/test/unit/transacted/CommitRollbackTest.java
index 1a45773907..224463a446 100644
--- a/java/client/src/test/java/org/apache/qpid/test/unit/transacted/CommitRollbackTest.java
+++ b/java/client/src/test/java/org/apache/qpid/test/unit/transacted/CommitRollbackTest.java
@@ -201,7 +201,7 @@ public class CommitRollbackTest extends TestCase
_logger.info("getting test message");
- Message msg = _consumer.receive(1000);
+ Message msg = _consumer.receive(5000);
assertNotNull("retrieved message is null", msg);
_logger.info("closing connection");
@@ -210,7 +210,7 @@ public class CommitRollbackTest extends TestCase
newConnection();
_logger.info("receiving result");
- Message result = _consumer.receive(1000);
+ Message result = _consumer.receive(5000);
_session.commit();
@@ -237,7 +237,7 @@ public class CommitRollbackTest extends TestCase
_logger.info("getting test message");
- Message msg = _consumer.receive(1000);
+ Message msg = _consumer.receive(5000);
assertNotNull("retrieved message is null", msg);
assertEquals("test message was correct message", MESSAGE_TEXT, ((TextMessage) msg).getText());
@@ -248,7 +248,7 @@ public class CommitRollbackTest extends TestCase
newConnection();
_logger.info("receiving result");
- Message result = _consumer.receive(1000);
+ Message result = _consumer.receive(5000);
_session.commit();
@@ -313,7 +313,7 @@ public class CommitRollbackTest extends TestCase
_logger.info("getting test message");
- Message msg = _consumer.receive(1000);
+ Message msg = _consumer.receive(5000);
assertNotNull("retrieved message is null", msg);
assertEquals("test message was correct message", MESSAGE_TEXT, ((TextMessage) msg).getText());
@@ -328,7 +328,7 @@ public class CommitRollbackTest extends TestCase
_consumer = _session.createConsumer(_jmsQueue);
- Message result = _consumer.receive(1000);
+ Message result = _consumer.receive(5000);
_session.commit();
assertNotNull("test message was consumed and rolled back, but is gone", result);
@@ -363,7 +363,7 @@ public class CommitRollbackTest extends TestCase
_session.rollback();
_logger.info("receiving result");
- Message result = _consumer.receive(1000);
+ Message result = _consumer.receive(5000);
assertNotNull("test message was consumed and rolled back, but is gone", result);
@@ -407,7 +407,6 @@ public class CommitRollbackTest extends TestCase
{
_logger.info("Got 1 redelivered");
assertTrue("Message is not marked as redelivered", result.getJMSRedelivered());
- assertFalse("Already received message one", _gotone);
_gotone = true;
}
@@ -418,15 +417,15 @@ public class CommitRollbackTest extends TestCase
if (result.getJMSRedelivered())
{
_logger.info("Got 2 redelivered, message was prefetched");
- assertFalse("Already received message redelivered two", _gottwoRedelivered);
-
_gottwoRedelivered = true;
+
}
else
{
_logger.warn("Got 2, message prefetched wasn't cleared or messages was in transit when rollback occured");
assertFalse("Already received message two", _gottwo);
-
+ assertFalse("Already received message redelivered two", _gottwoRedelivered);
+
_gottwo = true;
}
}
@@ -434,6 +433,13 @@ public class CommitRollbackTest extends TestCase
verifyMessages(_consumer.receive(1000));
}
+ /**
+ * This test sends two messages receives on of them but doesn't ack it.
+ * The consumer is then closed
+ * the first message should be returned as redelivered.
+ * the second message should be delivered normally.
+ * @throws Exception
+ */
public void testSend2ThenCloseAfter1andTryAgain() throws Exception
{
assertTrue("session is not transacted", _session.getTransacted());
@@ -445,7 +451,7 @@ public class CommitRollbackTest extends TestCase
_pubSession.commit();
_logger.info("getting test message");
- Message result = _consumer.receive(1000);
+ Message result = _consumer.receive(5000);
assertNotNull("Message received should not be null", result);
assertEquals("1", ((TextMessage) result).getText());
@@ -461,7 +467,7 @@ public class CommitRollbackTest extends TestCase
// NOTE: Both msg 1 & 2 will be marked as redelivered as they have both will have been rejected.
// Only the occasion where it is not rejected will it mean it hasn't arrived at the client yet.
- result = _consumer.receive(1000);
+ result = _consumer.receive(5000);
assertNotNull("test message was consumed and rolled back, but is gone", result);
// The first message back will be either 1 or 2 being redelivered
@@ -475,9 +481,16 @@ public class CommitRollbackTest extends TestCase
assertEquals("2", ((TextMessage) result).getText());
}
- result = _consumer.receive(1000);
- assertNotNull("test message was consumed and rolled back, but is gone", result);
- assertTrue("Messasge is not marked as redelivered" + result, result.getJMSRedelivered());
+ Message result2 = _consumer.receive(5000);
+ assertNotNull("test message was consumed and rolled back, but is gone", result2);
+
+ // if this is message 1 then it should be marked as redelivered
+ if("1".equals(((TextMessage) result2).getText()))
+ {
+ assertTrue("Messasge is not marked as redelivered" + result2, result2.getJMSRedelivered());
+ }
+
+ assertNotSame("Messages should not have the same content",((TextMessage) result2).getText(), ((TextMessage) result).getText() );
result = _consumer.receive(1000);
assertNull("test message should be null:" + result, result);
@@ -497,7 +510,7 @@ public class CommitRollbackTest extends TestCase
_publisher.send(_pubSession.createTextMessage(MESSAGE_TEXT));
_pubSession.commit();
- assertNotNull(_consumer.receive(100));
+ assertNotNull(_consumer.receive(5000));
_publisher.send(_pubSession.createTextMessage(MESSAGE_TEXT));
@@ -505,14 +518,14 @@ public class CommitRollbackTest extends TestCase
_pubSession.rollback();
_logger.info("receiving result");
- Message result = _consumer.receive(1000);
+ Message result = _consumer.receive(5000);
assertNull("test message was put and rolled back, but is still present", result);
_publisher.send(_pubSession.createTextMessage(MESSAGE_TEXT));
_pubSession.commit();
- assertNotNull(_consumer.receive(100));
+ assertNotNull(_consumer.receive(5000));
}
diff --git a/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java b/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
index 929621c496..678474a18b 100644
--- a/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
+++ b/java/client/src/test/java/org/apache/qpid/test/unit/transacted/TransactedTest.java
@@ -171,34 +171,33 @@ public class TransactedTest extends TestCase
public void testRollback() throws Exception
{
// add some messages
- _logger.info("Send prep A");
- prepProducer1.send(prepSession.createTextMessage("A"));
- _logger.info("Send prep B");
- prepProducer1.send(prepSession.createTextMessage("B"));
- _logger.info("Send prep C");
- prepProducer1.send(prepSession.createTextMessage("C"));
-
- // Quick sleep to ensure all three get pre-fetched
+ _logger.info("Send prep RB_A");
+ prepProducer1.send(prepSession.createTextMessage("RB_A"));
+ _logger.info("Send prep RB_B");
+ prepProducer1.send(prepSession.createTextMessage("RB_B"));
+ _logger.info("Send prep RB_C");
+ prepProducer1.send(prepSession.createTextMessage("RB_C"));
+
+ _logger.info("Sending RB_X RB_Y RB_Z");
+ producer2.send(session.createTextMessage("RB_X"));
+ producer2.send(session.createTextMessage("RB_Y"));
+ producer2.send(session.createTextMessage("RB_Z"));
+ _logger.info("Receiving RB_A RB_B");
+ expect("RB_A", consumer1.receive(1000));
+ expect("RB_B", consumer1.receive(1000));
+ // Don't consume 'RB_C' leave it in the prefetch cache to ensure rollback removes it.
+ // Quick sleep to ensure 'RB_C' gets pre-fetched
Thread.sleep(500);
- _logger.info("Sending X Y Z");
- producer2.send(session.createTextMessage("X"));
- producer2.send(session.createTextMessage("Y"));
- producer2.send(session.createTextMessage("Z"));
- _logger.info("Receiving A B");
- expect("A", consumer1.receive(1000));
- expect("B", consumer1.receive(1000));
- // Don't consume 'C' leave it in the prefetch cache to ensure rollback removes it.
-
// rollback
_logger.info("rollback");
session.rollback();
- _logger.info("Receiving A B C");
+ _logger.info("Receiving RB_A RB_B RB_C");
// ensure sent messages are not visible and received messages are requeued
- expect("A", consumer1.receive(1000), true);
- expect("B", consumer1.receive(1000), true);
- expect("C", consumer1.receive(1000), true);
+ expect("RB_A", consumer1.receive(1000), true);
+ expect("RB_B", consumer1.receive(1000), true);
+ expect("RB_C", consumer1.receive(1000), true);
_logger.info("Starting new connection");
testCon.start();
diff --git a/java/common/src/main/java/org/apache/qpid/framing/AMQShortString.java b/java/common/src/main/java/org/apache/qpid/framing/AMQShortString.java
index df99f6589d..ec501951af 100644
--- a/java/common/src/main/java/org/apache/qpid/framing/AMQShortString.java
+++ b/java/common/src/main/java/org/apache/qpid/framing/AMQShortString.java
@@ -212,6 +212,7 @@ public final class AMQShortString implements CharSequence, Comparable<AMQShortSt
if (size != 0)
{
+ buffer.setAutoExpand(true);
buffer.put((byte) size);
if (_data.buf().hasArray())
{
diff --git a/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java b/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
index 3438770450..46b10b5963 100644
--- a/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
+++ b/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
@@ -711,7 +711,10 @@ public class FieldTable
if (trace)
{
_logger.trace("FieldTable::writeToBuffer: Writing encoded length of " + getEncodedSize() + "...");
- _logger.trace(_properties.toString());
+ if (_properties != null)
+ {
+ _logger.trace(_properties.toString());
+ }
}
EncodingUtils.writeUnsignedInteger(buffer, getEncodedSize());
diff --git a/java/integrationtests/src/main/java/org/apache/qpid/interop/clienttestcases/TestCase4P2PMessageSize.java b/java/integrationtests/src/main/java/org/apache/qpid/interop/clienttestcases/TestCase4P2PMessageSize.java
new file mode 100644
index 0000000000..0388c56678
--- /dev/null
+++ b/java/integrationtests/src/main/java/org/apache/qpid/interop/clienttestcases/TestCase4P2PMessageSize.java
@@ -0,0 +1,214 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.interop.clienttestcases;
+
+import org.apache.log4j.Logger;
+
+import org.apache.qpid.test.framework.TestUtils;
+import org.apache.qpid.test.framework.distributedtesting.TestClient;
+import org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest;
+
+import javax.jms.*;
+
+/**
+ * Implements test case 4, P2P messages with message size. Sends/received a specified number of messages to a specified
+ * route on the default direct exchange, of a specified size. Produces reports on the actual number of messages
+ * sent/received.
+ *
+ * <p><table id="crc"><caption>CRC Card</caption>
+ * <tr><th> Responsibilities <th> Collaborations
+ * <tr><td> Supply the name of the test case that this implements.
+ * <tr><td> Accept/Reject invites based on test parameters.
+ * <tr><td> Adapt to assigned roles.
+ * <tr><td> Send required number of test messages.
+ * <tr><td> Generate test reports.
+ * </table>
+ */
+public class TestCase4P2PMessageSize implements TestClientControlledTest, MessageListener
+{
+ /** Used for debugging. */
+ private static final Logger log = Logger.getLogger(TestCase4P2PMessageSize.class);
+
+ /** Holds the count of test messages received. */
+ private int messageCount;
+
+ /** The role to be played by the test. */
+ private Roles role;
+
+ /** The number of test messages to send. */
+ private int numMessages;
+
+ /** The size of the test messages to send. */
+ private int messageSize;
+
+ /** The connection to send the test messages on. */
+ private Connection connection;
+
+ /** The controlSession to send the test messages on. */
+ private Session session;
+
+ /** The producer to send the test messages with. */
+ MessageProducer producer;
+
+ /**
+ * Should provide the name of the test case that this class implements. The exact names are defined in the
+ * interop testing spec.
+ *
+ * @return The name of the test case that this implements.
+ */
+ public String getName()
+ {
+ log.debug("public String getName(): called");
+
+ return "TC4_P2PMessageSize";
+ }
+
+ /**
+ * Determines whether the test invite that matched this test case is acceptable.
+ *
+ * @param inviteMessage The invitation to accept or reject.
+ *
+ * @return <tt>true</tt> to accept the invitation, <tt>false</tt> to reject it.
+ *
+ * @throws JMSException Any JMSException resulting from reading the message are allowed to fall through.
+ */
+ public boolean acceptInvite(Message inviteMessage) throws JMSException
+ {
+ log.debug("public boolean acceptInvite(Message inviteMessage = " + inviteMessage + "): called");
+
+ // All invites are acceptable.
+ return true;
+ }
+
+ /**
+ * Assigns the role to be played by this test case. The test parameters are fully specified in the
+ * assignment message. When this method return the test case will be ready to execute.
+ *
+ * @param role The role to be played; sender or receivers.
+ *
+ * @param assignRoleMessage The role assingment message, contains the full test parameters.
+ *
+ * @throws JMSException Any JMSException resulting from reading the message are allowed to fall through.
+ */
+ public void assignRole(Roles role, Message assignRoleMessage) throws JMSException
+ {
+ log.debug("public void assignRole(Roles role = " + role + ", Message assignRoleMessage = " + assignRoleMessage
+ + "): called");
+
+ // Reset the message count for a new test.
+ messageCount = 0;
+
+ // Take note of the role to be played.
+ this.role = role;
+
+ // Create a new connection to pass the test messages on.
+ connection = TestUtils.createConnection(TestClient.testContextProperties);
+ session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ // Extract and retain the test parameters.
+ numMessages = assignRoleMessage.getIntProperty("P2P_NUM_MESSAGES");
+ messageSize = assignRoleMessage.getIntProperty("messageSize");
+ Destination sendDestination = session.createQueue(assignRoleMessage.getStringProperty("P2P_QUEUE_AND_KEY_NAME"));
+
+ log.debug("numMessages = " + numMessages);
+ log.debug("sendDestination = " + sendDestination);
+ log.debug("role = " + role);
+
+ switch (role)
+ {
+ // Check if the sender role is being assigned, and set up a message producer if so.
+ case SENDER:
+ producer = session.createProducer(sendDestination);
+ break;
+
+ // Otherwise the receivers role is being assigned, so set this up to listen for messages.
+ case RECEIVER:
+ MessageConsumer consumer = session.createConsumer(sendDestination);
+ consumer.setMessageListener(this);
+ break;
+ }
+
+ connection.start();
+ }
+
+ /**
+ * Performs the test case actions. Returning from here, indicates that the sending role has completed its test.
+ *
+ * @param numMessages The number of test messages to send.
+ *
+ * @throws JMSException Any JMSException resulting from reading the message are allowed to fall through.
+ */
+ public void start(int numMessages) throws JMSException
+ {
+ log.debug("public void start(): called");
+
+ // Check that the sender role is being performed.
+ if (role.equals(Roles.SENDER))
+ {
+ Message testMessage = TestUtils.createTestMessageOfSize(session, messageSize);
+
+ for (int i = 0; i < this.numMessages; i++)
+ {
+ producer.send(testMessage);
+
+ // Increment the message count.
+ messageCount++;
+ }
+ }
+ }
+
+ /**
+ * Gets a report on the actions performed by the test case in its assigned role.
+ *
+ * @param session The controlSession to create the report message in.
+ *
+ * @return The report message.
+ *
+ * @throws JMSException Any JMSExceptions resulting from creating the report are allowed to fall through.
+ */
+ public Message getReport(Session session) throws JMSException
+ {
+ log.debug("public Message getReport(Session controlSession): called");
+
+ // Close the test connection.
+ connection.close();
+
+ // Generate a report message containing the count of the number of messages passed.
+ Message report = session.createMessage();
+ report.setStringProperty("CONTROL_TYPE", "REPORT");
+ report.setIntProperty("MESSAGE_COUNT", messageCount);
+
+ return report;
+ }
+
+ /**
+ * Counts incoming test messages.
+ *
+ * @param message The incoming test message.
+ */
+ public void onMessage(Message message)
+ {
+ log.debug("public void onMessage(Message message = " + message + "): called");
+
+ // Increment the message count.
+ messageCount++;
+ }
+}
diff --git a/java/integrationtests/src/main/java/org/apache/qpid/interop/clienttestcases/TestCase5PubSubMessageSize.java b/java/integrationtests/src/main/java/org/apache/qpid/interop/clienttestcases/TestCase5PubSubMessageSize.java
new file mode 100644
index 0000000000..ab59e16ab3
--- /dev/null
+++ b/java/integrationtests/src/main/java/org/apache/qpid/interop/clienttestcases/TestCase5PubSubMessageSize.java
@@ -0,0 +1,243 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.interop.clienttestcases;
+
+import org.apache.log4j.Logger;
+
+import org.apache.qpid.test.framework.TestUtils;
+import org.apache.qpid.test.framework.distributedtesting.TestClient;
+import org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest;
+
+import javax.jms.*;
+
+/**
+ * Implements test case 5, pub/sub with message size. Sends/received a specified number of messages to a specified route
+ * on the default topic exchange, using the specified number of receivers connections, and the specified message size.
+ * Produces reports on the actual number of messages sent/received.
+ *
+ * <p><table id="crc"><caption>CRC Card</caption>
+ * <tr><th> Responsibilities <th> Collaborations
+ * <tr><td> Supply the name of the test case that this implements.
+ * <tr><td> Accept/Reject invites based on test parameters.
+ * <tr><td> Adapt to assigned roles.
+ * <tr><td> Send required number of test messages using pub/sub.
+ * <tr><td> Generate test reports.
+ * </table>
+ */
+public class TestCase5PubSubMessageSize implements TestClientControlledTest, MessageListener
+{
+ /** Used for debugging. */
+ private static final Logger log = Logger.getLogger(TestCase5PubSubMessageSize.class);
+
+ /** Holds the count of test messages received. */
+ private int messageCount;
+
+ /** The role to be played by the test. */
+ private Roles role;
+
+ /** The number of test messages to send. */
+ private int numMessages;
+
+ /** The size of the test messages to send. */
+ private int messageSize;
+
+ /** The connections to send/receive the test messages on. */
+ private Connection[] connection;
+
+ /** The sessions to send/receive the test messages on. */
+ private Session[] session;
+
+ /** The producer to send the test messages with. */
+ MessageProducer producer;
+
+ /**
+ * Should provide the name of the test case that this class implements. The exact names are defined in the
+ * interop testing spec.
+ *
+ * @return The name of the test case that this implements.
+ */
+ public String getName()
+ {
+ log.debug("public String getName(): called");
+
+ return "TC5_PubSubMessageSize";
+ }
+
+ /**
+ * Determines whether the test invite that matched this test case is acceptable.
+ *
+ * @param inviteMessage The invitation to accept or reject.
+ *
+ * @return <tt>true</tt> to accept the invitation, <tt>false</tt> to reject it.
+ *
+ * @throws javax.jms.JMSException Any JMSException resulting from reading the message are allowed to fall through.
+ */
+ public boolean acceptInvite(Message inviteMessage) throws JMSException
+ {
+ log.debug("public boolean acceptInvite(Message inviteMessage = " + inviteMessage + "): called");
+
+ // All invites are acceptable.
+ return true;
+ }
+
+ /**
+ * Assigns the role to be played by this test case. The test parameters are fully specified in the
+ * assignment message. When this method return the test case will be ready to execute.
+ *
+ * @param role The role to be played; sender or receivers.
+ *
+ * @param assignRoleMessage The role assingment message, contains the full test parameters.
+ *
+ * @throws javax.jms.JMSException Any JMSException resulting from reading the message are allowed to fall through.
+ */
+ public void assignRole(Roles role, Message assignRoleMessage) throws JMSException
+ {
+ log.debug("public void assignRole(Roles role = " + role + ", Message assignRoleMessage = " + assignRoleMessage
+ + "): called");
+
+ // Reset the message count for a new test.
+ messageCount = 0;
+
+ // Take note of the role to be played.
+ this.role = role;
+
+ // Extract and retain the test parameters.
+ numMessages = assignRoleMessage.getIntProperty("PUBSUB_NUM_MESSAGES");
+ messageSize = assignRoleMessage.getIntProperty("messageSize");
+ int numReceivers = assignRoleMessage.getIntProperty("PUBSUB_NUM_RECEIVERS");
+ String sendKey = assignRoleMessage.getStringProperty("PUBSUB_KEY");
+
+ log.debug("numMessages = " + numMessages);
+ log.debug("numReceivers = " + numReceivers);
+ log.debug("sendKey = " + sendKey);
+ log.debug("role = " + role);
+
+ switch (role)
+ {
+ // Check if the sender role is being assigned, and set up a single message producer if so.
+ case SENDER:
+ // Create a new connection to pass the test messages on.
+ connection = new Connection[1];
+ session = new Session[1];
+
+ connection[0] = TestUtils.createConnection(TestClient.testContextProperties);
+ session[0] = connection[0].createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ // Extract and retain the test parameters.
+ Destination sendDestination = session[0].createTopic(sendKey);
+
+ producer = session[0].createProducer(sendDestination);
+ break;
+
+ // Otherwise the receivers role is being assigned, so set this up to listen for messages on the required number
+ // of receivers connections.
+ case RECEIVER:
+ // Create the required number of receivers connections.
+ connection = new Connection[numReceivers];
+ session = new Session[numReceivers];
+
+ for (int i = 0; i < numReceivers; i++)
+ {
+ connection[i] = TestUtils.createConnection(TestClient.testContextProperties);
+ session[i] = connection[i].createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ sendDestination = session[i].createTopic(sendKey);
+
+ MessageConsumer consumer = session[i].createConsumer(sendDestination);
+ consumer.setMessageListener(this);
+ }
+
+ break;
+ }
+
+ // Start all the connection dispatcher threads running.
+ for (Connection conn : connection)
+ {
+ conn.start();
+ }
+ }
+
+ /**
+ * Performs the test case actions. Returning from here, indicates that the sending role has completed its test.
+ *
+ * @param numMessages The number of test messages to send.
+ *
+ * @throws JMSException Any JMSException resulting from reading the message are allowed to fall through.
+ */
+ public void start(int numMessages) throws JMSException
+ {
+ log.debug("public void start(): called");
+
+ // Check that the sender role is being performed.
+ if (role.equals(Roles.SENDER))
+ {
+ Message testMessage = TestUtils.createTestMessageOfSize(session[0], messageSize);
+
+ for (int i = 0; i < this.numMessages; i++)
+ {
+ producer.send(testMessage);
+
+ // Increment the message count.
+ messageCount++;
+ }
+ }
+ }
+
+ /**
+ * Gets a report on the actions performed by the test case in its assigned role.
+ *
+ * @param session The controlSession to create the report message in.
+ *
+ * @return The report message.
+ *
+ * @throws javax.jms.JMSException Any JMSExceptions resulting from creating the report are allowed to fall through.
+ */
+ public Message getReport(Session session) throws JMSException
+ {
+ log.debug("public Message getReport(Session controlSession): called");
+
+ // Close the test connections.
+ for (Connection conn : connection)
+ {
+ conn.close();
+ }
+
+ // Generate a report message containing the count of the number of messages passed.
+ Message report = session.createMessage();
+ report.setStringProperty("CONTROL_TYPE", "REPORT");
+ report.setIntProperty("MESSAGE_COUNT", messageCount);
+
+ return report;
+ }
+
+ /**
+ * Counts incoming test messages.
+ *
+ * @param message The incoming test message.
+ */
+ public void onMessage(Message message)
+ {
+ log.debug("public void onMessage(Message message = " + message + "): called");
+
+ // Increment the message count.
+ messageCount++;
+ }
+}
diff --git a/java/integrationtests/src/main/java/org/apache/qpid/interop/testcases/InteropTestCase4P2PMessageSize.java b/java/integrationtests/src/main/java/org/apache/qpid/interop/testcases/InteropTestCase4P2PMessageSize.java
new file mode 100644
index 0000000000..c3f450ec42
--- /dev/null
+++ b/java/integrationtests/src/main/java/org/apache/qpid/interop/testcases/InteropTestCase4P2PMessageSize.java
@@ -0,0 +1,193 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.interop.testcases;
+
+import org.apache.log4j.Logger;
+
+import org.apache.qpid.test.framework.FrameworkBaseCase;
+
+import java.util.Properties;
+
+/**
+ * Implements test case 4, from the interop test specification. This test sets up the TC2_P2PMessageSize test for 50
+ * messages, and a variety of message sizes. It checks that the sender and receivers reports both indicate that all
+ * the test messages were transmitted successfully.
+ *
+ * <p><table id="crc"><caption>CRC Card</caption>
+ * <tr><th> Responsibilities <th> Collaborations
+ * <tr><td> Setup p2p test parameters and compare with test output. <td> {@link FrameworkBaseCase}
+ * </table>
+ */
+public class InteropTestCase4P2PMessageSize extends FrameworkBaseCase
+{
+ /** Used for debugging. */
+ private static final Logger log = Logger.getLogger(InteropTestCase4P2PMessageSize.class);
+
+ /**
+ * Creates a new coordinating test case with the specified name.
+ *
+ * @param name The test case name.
+ */
+ public InteropTestCase4P2PMessageSize(String name)
+ {
+ super(name);
+ }
+
+ /**
+ * Performs the P2P message test case, "Test Case 4" in the specification, for messages 0K in size.
+ *
+ * @throws Exception Any exceptions are allowed to fall through and fail the test.
+ */
+ public void testP2PMessageSize0K() throws Exception
+ {
+ runTestForMessagesOfSize(0);
+ }
+
+ /**
+ * Performs the P2P message test case, "Test Case 4" in the specification, for messages 63K in size.
+ *
+ * @throws Exception Any exceptions are allowed to fall through and fail the test.
+ */
+ public void testP2PMessageSize63K() throws Exception
+ {
+ runTestForMessagesOfSize(63 * 1024);
+ }
+
+ /**
+ * Performs the P2P message test case, "Test Case 4" in the specification, for messages 64K in size.
+ *
+ * @throws Exception Any exceptions are allowed to fall through and fail the test.
+ */
+ public void testP2PMessageSize64K() throws Exception
+ {
+ runTestForMessagesOfSize(64 * 1024);
+ }
+
+ /**
+ * Performs the P2P message test case, "Test Case 4" in the specification, for messages 65K in size.
+ *
+ * @throws Exception Any exceptions are allowed to fall through and fail the test.
+ */
+ public void testP2PMessageSize65K() throws Exception
+ {
+ runTestForMessagesOfSize(65 * 1024);
+ }
+
+ /**
+ * Performs the P2P message test case, "Test Case 4" in the specification, for messages 127K in size.
+ *
+ * @throws Exception Any exceptions are allowed to fall through and fail the test.
+ */
+ public void testP2PMessageSize127K() throws Exception
+ {
+ runTestForMessagesOfSize(127 * 1024);
+ }
+
+ /**
+ * Performs the P2P message test case, "Test Case 4" in the specification, for messages 128K in size.
+ *
+ * @throws Exception Any exceptions are allowed to fall through and fail the test.
+ */
+ public void testP2PMessageSize128K() throws Exception
+ {
+ runTestForMessagesOfSize(128 * 1024);
+ }
+
+ /**
+ * Performs the P2P message test case, "Test Case 4" in the specification, for messages 129K in size.
+ *
+ * @throws Exception Any exceptions are allowed to fall through and fail the test.
+ */
+ public void testP2PMessageSize129K() throws Exception
+ {
+ runTestForMessagesOfSize(129 * 1024);
+ }
+
+ /**
+ * Performs the P2P message test case, "Test Case 4" in the specification, for messages 255K in size.
+ *
+ * @throws Exception Any exceptions are allowed to fall through and fail the test.
+ */
+ public void testP2PMessageSize255K() throws Exception
+ {
+ runTestForMessagesOfSize(255 * 1024);
+ }
+
+ /**
+ * Performs the P2P message test case, "Test Case 4" in the specification, for messages 256K in size.
+ *
+ * @throws Exception Any exceptions are allowed to fall through and fail the test.
+ */
+ public void testP2PMessageSize256K() throws Exception
+ {
+ runTestForMessagesOfSize(256 * 1024);
+ }
+
+ /**
+ * Performs the P2P message test case, "Test Case 4" in the specification, for messages 257K in size.
+ *
+ * @throws Exception Any exceptions are allowed to fall through and fail the test.
+ */
+ public void testP2PMessageSize257K() throws Exception
+ {
+ runTestForMessagesOfSize(257 * 1024);
+ }
+
+ /**
+ * Sends 50 test messages of the specified size, and asserts that all were received.
+ *
+ * @param size The size of the messages to send in bytes.
+ */
+ private void runTestForMessagesOfSize(int size)
+ {
+ Properties testConfig = new Properties();
+ testConfig.setProperty("TEST_NAME", "TC4_P2PMessageSize");
+ testConfig.setProperty("P2P_QUEUE_AND_KEY_NAME", "tc2queue");
+ testConfig.put("P2P_NUM_MESSAGES", 50);
+ testConfig.put("messageSize", size);
+
+ /*Message[] reports =*/
+ getCircuitFactory().sequenceTest(null, null, testConfig);
+
+ // Compare sender and receivers reports.
+ /*
+ int messagesSent = reports[0].getIntProperty("MESSAGE_COUNT");
+ int messagesReceived = reports[1].getIntProperty("MESSAGE_COUNT");
+
+ Assert.assertEquals("The requested number of messages were not sent.", 50, messagesSent);
+ Assert.assertEquals("Sender and receivers messages sent did not match up.", messagesSent, messagesReceived);
+ */
+ }
+
+ /**
+ * Should provide a translation from the junit method name of a test to its test case name as defined in the
+ * interop testing specification. For example the method "testP2P" might map onto the interop test case name
+ * "TC2_BasicP2P".
+ *
+ * @param methodName The name of the JUnit test method.
+ *
+ * @return The name of the corresponding interop test case.
+ */
+ public String getTestCaseNameForTestMethod(String methodName)
+ {
+ return "TC4_P2PMessageSize";
+ }
+}
diff --git a/java/integrationtests/src/main/java/org/apache/qpid/interop/testcases/InteropTestCase5PubSubMessageSize.java b/java/integrationtests/src/main/java/org/apache/qpid/interop/testcases/InteropTestCase5PubSubMessageSize.java
new file mode 100644
index 0000000000..86a0a60ea4
--- /dev/null
+++ b/java/integrationtests/src/main/java/org/apache/qpid/interop/testcases/InteropTestCase5PubSubMessageSize.java
@@ -0,0 +1,193 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.interop.testcases;
+
+import org.apache.log4j.Logger;
+
+import org.apache.qpid.test.framework.FrameworkBaseCase;
+
+import java.util.Properties;
+
+/**
+ * Implements test case 5, from the interop test specification. This test sets up the TC2_PubSubMessageSize test for 10
+ * messages, sent to 5 consumers, and a variety of message sizes. It checks that the sender and receivers reports both
+ * indicate that all the test messages were transmitted successfully.
+ *
+ * <p><table id="crc"><caption>CRC Card</caption>
+ * <tr><th> Responsibilities <th> Collaborations
+ * <tr><td> Setup pub/sub test parameters and compare with test output. <td> {@link FrameworkBaseCase}
+ * </table>
+ */
+public class InteropTestCase5PubSubMessageSize extends FrameworkBaseCase
+{
+ /** Used for debugging. */
+ private static final Logger log = Logger.getLogger(InteropTestCase5PubSubMessageSize.class);
+
+ /**
+ * Creates a new coordinating test case with the specified name.
+ *
+ * @param name The test case name.
+ */
+ public InteropTestCase5PubSubMessageSize(String name)
+ {
+ super(name);
+ }
+
+ /**
+ * Performs the P2P message test case, "Test Case 4" in the specification, for messages 0K in size.
+ *
+ * @throws Exception Any exceptions are allowed to fall through and fail the test.
+ */
+ public void testPubSubMessageSize0K() throws Exception
+ {
+ runTestForMessagesOfSize(0);
+ }
+
+ /**
+ * Performs the P2P message test case, "Test Case 4" in the specification, for messages 63K in size.
+ *
+ * @throws Exception Any exceptions are allowed to fall through and fail the test.
+ */
+ public void testPubSubMessageSize63K() throws Exception
+ {
+ runTestForMessagesOfSize(63 * 1024);
+ }
+
+ /**
+ * Performs the P2P message test case, "Test Case 4" in the specification, for messages 64K in size.
+ *
+ * @throws Exception Any exceptions are allowed to fall through and fail the test.
+ */
+ public void testPubSubMessageSize64K() throws Exception
+ {
+ runTestForMessagesOfSize(64 * 1024);
+ }
+
+ /**
+ * Performs the P2P message test case, "Test Case 4" in the specification, for messages 65K in size.
+ *
+ * @throws Exception Any exceptions are allowed to fall through and fail the test.
+ */
+ public void testPubSubMessageSize65K() throws Exception
+ {
+ runTestForMessagesOfSize(65 * 1024);
+ }
+
+ /**
+ * Performs the P2P message test case, "Test Case 4" in the specification, for messages 127K in size.
+ *
+ * @throws Exception Any exceptions are allowed to fall through and fail the test.
+ */
+ public void testPubSubMessageSize127K() throws Exception
+ {
+ runTestForMessagesOfSize(127 * 1024);
+ }
+
+ /**
+ * Performs the P2P message test case, "Test Case 4" in the specification, for messages 128K in size.
+ *
+ * @throws Exception Any exceptions are allowed to fall through and fail the test.
+ */
+ public void testPubSubMessageSize128K() throws Exception
+ {
+ runTestForMessagesOfSize(128 * 1024);
+ }
+
+ /**
+ * Performs the P2P message test case, "Test Case 4" in the specification, for messages 129K in size.
+ *
+ * @throws Exception Any exceptions are allowed to fall through and fail the test.
+ */
+ public void testPubSubMessageSize129K() throws Exception
+ {
+ runTestForMessagesOfSize(129 * 1024);
+ }
+
+ /**
+ * Performs the P2P message test case, "Test Case 4" in the specification, for messages 255K in size.
+ *
+ * @throws Exception Any exceptions are allowed to fall through and fail the test.
+ */
+ public void testPubSubMessageSize255K() throws Exception
+ {
+ runTestForMessagesOfSize(255 * 1024);
+ }
+
+ /**
+ * Performs the P2P message test case, "Test Case 4" in the specification, for messages 256K in size.
+ *
+ * @throws Exception Any exceptions are allowed to fall through and fail the test.
+ */
+ public void testPubSubMessageSize256K() throws Exception
+ {
+ runTestForMessagesOfSize(256 * 1024);
+ }
+
+ /**
+ * Performs the P2P message test case, "Test Case 4" in the specification, for messages 257K in size.
+ *
+ * @throws Exception Any exceptions are allowed to fall through and fail the test.
+ */
+ public void testPubSubMessageSize257K() throws Exception
+ {
+ runTestForMessagesOfSize(257 * 1024);
+ }
+
+ /**
+ * Sends 50 test messages of the specified size, and asserts that all were received.
+ *
+ * @param size The size of the messages to send in bytes.
+ */
+ private void runTestForMessagesOfSize(int size)
+ {
+ Properties testConfig = new Properties();
+ testConfig.put("TEST_NAME", "TC5_PubSubMessageSize");
+ testConfig.put("PUBSUB_KEY", "tc3route");
+ testConfig.put("PUBSUB_NUM_MESSAGES", 10);
+ testConfig.put("PUBSUB_NUM_RECEIVERS", 5);
+ testConfig.put("messageSize", size);
+
+ /*Message[] reports =*/
+ getCircuitFactory().sequenceTest(null, null, testConfig);
+
+ // Compare sender and receivers reports.
+ /*
+ int messagesSent = reports[0].getIntProperty("MESSAGE_COUNT");
+ int messagesReceived = reports[1].getIntProperty("MESSAGE_COUNT");
+
+ Assert.assertEquals("The requested number of messages were not sent.", 50, messagesSent);
+ Assert.assertEquals("Sender and receivers messages sent did not match up.", messagesSent, messagesReceived);
+ */
+ }
+
+ /**
+ * Should provide a translation from the junit method name of a test to its test case name as defined in the
+ * interop testing specification. For example the method "testP2P" might map onto the interop test case name
+ * "TC2_BasicP2P".
+ *
+ * @param methodName The name of the JUnit test method.
+ * @return The name of the corresponding interop test case.
+ */
+ public String getTestCaseNameForTestMethod(String methodName)
+ {
+ return "TC5_PubSubMessageSize";
+ }
+}
diff --git a/java/integrationtests/src/main/java/org/apache/qpid/test/framework/distributedtesting/TestClient.java b/java/integrationtests/src/main/java/org/apache/qpid/test/framework/distributedtesting/TestClient.java
index 486950a2f7..8f0ef193ef 100644
--- a/java/integrationtests/src/main/java/org/apache/qpid/test/framework/distributedtesting/TestClient.java
+++ b/java/integrationtests/src/main/java/org/apache/qpid/test/framework/distributedtesting/TestClient.java
@@ -23,9 +23,7 @@ package org.apache.qpid.test.framework.distributedtesting;
import org.apache.log4j.Logger;
import org.apache.log4j.NDC;
-import org.apache.qpid.interop.clienttestcases.TestCase1DummyRun;
-import org.apache.qpid.interop.clienttestcases.TestCase2BasicP2P;
-import org.apache.qpid.interop.clienttestcases.TestCase3BasicPubSub;
+import org.apache.qpid.interop.clienttestcases.*;
import org.apache.qpid.sustained.SustainedClientTestCase;
import org.apache.qpid.test.framework.MessagingTestConfigProperties;
import org.apache.qpid.test.framework.TestUtils;
@@ -189,7 +187,8 @@ public class TestClient implements MessageListener
new ArrayList<Class<? extends TestClientControlledTest>>();
// ClasspathScanner.getMatches(TestClientControlledTest.class, "^TestCase.*", true);
Collections.addAll(testCaseClasses, TestCase1DummyRun.class, TestCase2BasicP2P.class, TestCase3BasicPubSub.class,
- SustainedClientTestCase.class, TestClientCircuitEnd.class);
+ TestCase4P2PMessageSize.class, TestCase5PubSubMessageSize.class, SustainedClientTestCase.class,
+ TestClientCircuitEnd.class);
try
{
diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java
index f5b4a22e03..f2cd594684 100644
--- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java
+++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java
@@ -745,10 +745,11 @@ public class OperationTabControl extends TabControl
}
TabularDataSupport tabularData = (TabularDataSupport)result;
- Collection<CompositeData> records = tabularData.values();
+ Collection<Object> records = tabularData.values();
List<String> list = new ArrayList<String>();
- for (CompositeData data : records)
+ for (Object o : records)
{
+ CompositeData data = (CompositeData) o;
if (data.containsKey(USERNAME))
{
list.add(data.get(USERNAME).toString());
diff --git a/java/perftests/bin/run_many.sh b/java/perftests/bin/run_many.sh
new file mode 100755
index 0000000000..cca2ffec21
--- /dev/null
+++ b/java/perftests/bin/run_many.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+
+# args:
+# <number of processes to start>
+# <name of run>
+# <command ro run>
+
+for i in `seq 1 $1`; do
+ $3 >$2.$i.out 2>>$2.err &
+ echo $! > $2.$i.pid
+done;
diff --git a/java/perftests/bin/topicListener.sh b/java/perftests/bin/topicListener.sh
new file mode 100755
index 0000000000..a728592cd7
--- /dev/null
+++ b/java/perftests/bin/topicListener.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+
+# XXX -Xmx512m -Xms512m -XX:NewSize=150m
+QPID_LIBS=$QPID_HOME/lib/qpid-incubating.jar
+TEST_JAR=$QPID_HOME/../../../../perftests/target/qpid-perftests-1.0-incubating-M2-SNAPSHOT.jar
+
+# Set other variables used by the qpid-run script before calling
+export JAVA=java \
+ JAVA_VM=-server \
+ JAVA_MEM="-Xmx128m -Dlog4j.configuration=$HOME/log4j.properties" \
+ JAVA_GC="-XX:-UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError" \
+ QPID_CLASSPATH=$QPID_LIBS:$TEST_JAR
+
+. qpid-run -Damqj.logging.level="INFO" org.apache.qpid.oldtopic.Listener $*
diff --git a/java/perftests/bin/topicPublisher.sh b/java/perftests/bin/topicPublisher.sh
new file mode 100755
index 0000000000..f9b6bc19fe
--- /dev/null
+++ b/java/perftests/bin/topicPublisher.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# XXX -Xmx512m -Xms512m -XX:NewSize=150m
+QPID_LIBS=$QPID_HOME/lib/qpid-incubating.jar
+TEST_JAR=$QPID_HOME/../../../../perftests/target/qpid-perftests-1.0-incubating-M2-SNAPSHOT.jar
+
+# Set other variables used by the qpid-run script before calling
+export JAVA=java \
+ JAVA_VM=-server \
+ JAVA_MEM=-Xmx128m \
+ JAVA_GC="-XX:-UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError" \
+ QPID_CLASSPATH=$QPID_LIBS:$TEST_JAR
+
+. qpid-run -Damqj.logging.level="INFO" org.apache.qpid.oldtopic.Publisher $*
diff --git a/java/perftests/distribution/pom.xml b/java/perftests/distribution/pom.xml
index de6497b5b8..c0e81ce3f5 100644
--- a/java/perftests/distribution/pom.xml
+++ b/java/perftests/distribution/pom.xml
@@ -56,13 +56,13 @@
<dependency>
<groupId>uk.co.thebadgerset</groupId>
<artifactId>junit-toolkit</artifactId>
- <version>0.5</version>
+ <version>0.6-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>uk.co.thebadgerset</groupId>
<artifactId>junit-toolkit-maven-plugin</artifactId>
- <version>0.5</version>
+ <version>0.6-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
</dependencies>
diff --git a/java/perftests/pom.xml b/java/perftests/pom.xml
index b7cabf8f9b..7390cd45a1 100644
--- a/java/perftests/pom.xml
+++ b/java/perftests/pom.xml
@@ -192,142 +192,159 @@
<Ping-Failover-Before-Commit>-n Ping-Failover-Before-Commit -s[100] -o . -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf commitBatchSize=10 failBeforeCommit=true</Ping-Failover-Before-Commit>
<Ping-Failover-After-Commit>-n Ping-Failover-After-Commit -s[100] -o . -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf commitBatchSize=10 failAfterCommit=true</Ping-Failover-After-Commit>
+ <!--
+ ***** If editing below, please use a non line wrapping mode and keep in columns, makes it easier to check for consistent
+ ***** parameter setting accross all of the tests.
+ -->
+
<!--
- Qpid Performance Tests. If editing, please use a non line wrapping mode and keep in columns, makes it easier to check
- for consistent parameter setting accross all of the tests.
+ Reliability tests. The longer these tests can be run, the better.
+ Tests 01 and 02 run for a short time. Use these to get an idea of the expected throughput.
+ Tests 03 to 08 test all ack modes, transient/persistent, p2p/pubsub. There are 24 tests in total running for 1 hour each.
+ This can be shortened or lengthened for the desired burn-in test time.
-->
+ <TQR-Qpid-01>-n TQR-Qpid-01 -d1M -s[1000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </TQR-Qpid-01>
+ <TQR-Qpid-02>-n TQR-Qpid-02 -d1M -s[1000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </TQR-Qpid-02>
+ <TTR-Qpid-01>-n TTR-Qpid-01 -d1M -s[100] -c[2] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=8 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </TTR-Qpid-01>
+ <TTR-Qpid-02>-n TTR-Qpid-02 -d1M -s[100] -c[2] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=8 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </TTR-Qpid-02>
+ <PQR-Qpid-01>-n PQR-Qpid-01 -d1M -s[1000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </PQR-Qpid-01>
+ <PQR-Qpid-02>-n PQR-Qpid-02 -d1M -s[1000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </PQR-Qpid-02>
+ <PTR-Qpid-01>-n PTR-Qpid-01 -d1M -s[100] -c[2] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=8 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </PTR-Qpid-01>
+ <PTR-Qpid-02>-n PTR-Qpid-02 -d1M -s[100] -c[2] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=8 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </PTR-Qpid-02>
+
+ <TQR-Qpid-03-TX>-n TQR-Qpid-03 -d1H -s[10000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </TQR-Qpid-03-TX>
+ <TQR-Qpid-04-AUTOACK>-n TQR-Qpid-04 -d1H -s[10000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </TQR-Qpid-04-AUTOACK>
+ <TQR-Qpid-05-CLIENTACK>-n TQR-Qpid-05 -d1H -s[10000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=2 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </TQR-Qpid-05-CLIENTACK>
+ <TQR-Qpid-06-DUPSOKACK>-n TQR-Qpid-06 -d1H -s[10000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=3 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </TQR-Qpid-06-DUPSOKACK>
+ <TQR-Qpid-07-NOACK>-n TQR-Qpid-07 -d1H -s[10000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=257 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </TQR-Qpid-07-NOACK>
+ <TQR-Qpid-08-PREACK>-n TQR-Qpid-08 -d1H -s[10000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=258 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </TQR-Qpid-08-PREACK>
+
+ <TTR-Qpid-03-TX>-n TTR-Qpid-03 -d1H -s[1000] -c[2] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=8 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </TTR-Qpid-03-TX>
+ <TTR-Qpid-04-AUTOACK>-n TTR-Qpid-04 -d1H -s[1000] -c[2] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=8 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </TTR-Qpid-04-AUTOACK>
+ <TTR-Qpid-05-CLIENTACK>-n TTR-Qpid-05 -d1H -s[1000] -c[2] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=8 transacted=false consTransacted=false consAckMode=2 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </TTR-Qpid-05-CLIENTACK>
+ <TTR-Qpid-06-DUPSOKACK>-n TTR-Qpid-06 -d1H -s[1000] -c[2] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=8 transacted=false consTransacted=false consAckMode=3 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </TTR-Qpid-06-DUPSOKACK>
+ <TTR-Qpid-07-NOACK>-n TTR-Qpid-07 -d1H -s[1000] -c[2] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=8 transacted=false consTransacted=false consAckMode=257 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </TTR-Qpid-07-NOACK>
+ <TTR-Qpid-08-PREACK>-n TTR-Qpid-08 -d1H -s[1000] -c[2] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=8 transacted=false consTransacted=false consAckMode=258 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </TTR-Qpid-08-PREACK>
+
+ <PQR-Qpid-03-TX>-n PQR-Qpid-03 -d1H -s[1000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </PQR-Qpid-03-TX>
+ <PQR-Qpid-04-AUTOACK>-n PQR-Qpid-04 -d1H -s[1000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </PQR-Qpid-04-AUTOACK>
+ <PQR-Qpid-05-CLIENTACK>-n PQR-Qpid-05 -d1H -s[1000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=2 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </PQR-Qpid-05-CLIENTACK>
+ <PQR-Qpid-06-DUPSOKACK>-n PQR-Qpid-06 -d1H -s[1000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=3 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </PQR-Qpid-06-DUPSOKACK>
+ <PQR-Qpid-07-NOACK>-n PQR-Qpid-07 -d1H -s[1000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=257 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </PQR-Qpid-07-NOACK>
+ <PQR-Qpid-08-PREACK>-n PQR-Qpid-08 -d1H -s[1000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=258 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </PQR-Qpid-08-PREACK>
+
+ <PTR-Qpid-03-TX>-n PTR-Qpid-03 -d1H -s[100] -c[2] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=8 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </PTR-Qpid-03-TX>
+ <PTR-Qpid-04-AUTOACK>-n PTR-Qpid-04 -d1H -s[100] -c[2] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=8 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </PTR-Qpid-04-AUTOACK>
+ <PTR-Qpid-05-CLIENTACK>-n PTR-Qpid-05 -d1H -s[100] -c[2] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=8 transacted=false consTransacted=false consAckMode=2 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </PTR-Qpid-05-CLIENTACK>
+ <PTR-Qpid-06-DUPSOKACK>-n PTR-Qpid-06 -d1H -s[100] -c[2] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=8 transacted=false consTransacted=false consAckMode=3 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </PTR-Qpid-06-DUPSOKACK>
+ <PTR-Qpid-07-NOACK>-n PTR-Qpid-07 -d1H -s[100] -c[2] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=8 transacted=false consTransacted=false consAckMode=257 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </PTR-Qpid-07-NOACK>
+ <PTR-Qpid-08-PREACK>-n PTR-Qpid-08 -d1H -s[100] -c[2] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=8 transacted=false consTransacted=false consAckMode=258 commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=500000 </PTR-Qpid-08-PREACK>
+
+ <!-- Performance Tests. -->
<!-- Transient, P2P Tests -->
- <TQR-Qpid-01>-n TQR-Qpid-01 -d10M -s[1000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=10000000</TQR-Qpid-01>
- <TQR-Qpid-02>-n TQR-Qpid-02 -d10M -s[1000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=10000000</TQR-Qpid-02>
- <TQR-Qpid-03>-n TQR-Qpid-03 -d24H -s[100000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=10000000</TQR-Qpid-03>
- <TQR-Qpid-04>-n TQR-Qpid-04 -d24H -s[100000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=10000000</TQR-Qpid-04>
-
- <TQC-Qpid-01>-n TQC-Qpid-01 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=2000 maxPending=1000000 </TQC-Qpid-01>
- <TQC-Qpid-02>-n TQC-Qpid-02 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=2000 maxPending=1000000 </TQC-Qpid-02>
- <TQC-Qpid-03>-n TQC-Qpid-03 -d10M -s[1000] -c[10] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=1000000 </TQC-Qpid-03>
- <TQC-Qpid-04>-n TQC-Qpid-04 -d10M -s[1000] -c[10] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=1000000 </TQC-Qpid-04>
- <TQC-Qpid-05>-n TQC-Qpid-05 -d10M -s[1000] -c[100] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=100000 </TQC-Qpid-05>
- <TQC-Qpid-06>-n TQC-Qpid-06 -d10M -s[1000] -c[100] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=100000 </TQC-Qpid-06>
-
- <TQCL-Qpid-01>-n TQCL-Qpid-01 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=2000 maxPending=1000000 </TQCL-Qpid-01>
- <TQCL-Qpid-02>-n TQCL-Qpid-02 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=2000 maxPending=1000000 </TQCL-Qpid-02>
-
- <TQM-Qpid-01-512b>-n TQM-Qpid-01-512b -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=512 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-01-512b>
- <TQM-Qpid-02-512b>-n TQM-Qpid-02-512b -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=512 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-02-512b>
- <TQM-Qpid-01-1K>-n TQM-Qpid-01-1K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=1024 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-01-1K>
- <TQM-Qpid-02-1K>-n TQM-Qpid-02-1K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=1024 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-02-1K>
- <TQM-Qpid-01-5K>-n TQM-Qpid-01-5K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=5120 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-01-5K>
- <TQM-Qpid-02-5K>-n TQM-Qpid-02-5K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=5120 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-02-5K>
- <TQM-Qpid-01-10K>-n TQM-Qpid-01-10K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=10240 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-01-10K>
- <TQM-Qpid-02-10K>-n TQM-Qpid-02-10K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=10240 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-02-10K>
- <TQM-Qpid-01-50K>-n TQM-Qpid-01-50K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=51200 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-01-50K>
- <TQM-Qpid-02-50K>-n TQM-Qpid-02-50K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=51200 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-02-50K>
- <TQM-Qpid-01-100K>-n TQM-Qpid-01-100K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=102400 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-01-100K>
- <TQM-Qpid-02-100K>-n TQM-Qpid-02-100K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=102400 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-02-100K>
- <TQM-Qpid-01-500K>-n TQM-Qpid-01-500K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=512000 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-01-500K>
- <TQM-Qpid-02-500K>-n TQM-Qpid-02-500K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=512000 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-02-500K>
- <TQM-Qpid-01-1M>-n TQM-Qpid-01-1M -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=1048576 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-01-1M>
- <TQM-Qpid-02-1M>-n TQM-Qpid-02-1M -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=1048576 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-02-1M>
+ <TQCT-Qpid-01>-n TQCT-Qpid-01 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=2000 maxPending=2000000 </TQCT-Qpid-01>
+ <TQCT-Qpid-02>-n TQCT-Qpid-02 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=2000 maxPending=2000000 </TQCT-Qpid-02>
+ <TQCL-Qpid-01>-n TQCL-Qpid-01 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=2000 maxPending=2000000 </TQCL-Qpid-01>
+ <TQCL-Qpid-02>-n TQCL-Qpid-02 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=2000 maxPending=2000000 </TQCL-Qpid-02>
+
+ <!-- <TQC-Qpid-05>-n TQC-Qpid-05 -d10M -s[10] -c[100] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=100000 </TQC-Qpid-05> -->
+ <!-- <TQC-Qpid-06>-n TQC-Qpid-06 -d10M -s[10] -c[100] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=100000 </TQC-Qpid-06> -->
+
+ <TQM-Qpid-01-512b>-n TQM-Qpid-01-512b -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </TQM-Qpid-01-512b>
+ <TQM-Qpid-02-512b>-n TQM-Qpid-02-512b -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </TQM-Qpid-02-512b>
+ <TQM-Qpid-01-1K>-n TQM-Qpid-01-1K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=1024 destinationCount=1 rate=0 maxPending=2000000 </TQM-Qpid-01-1K>
+ <TQM-Qpid-02-1K>-n TQM-Qpid-02-1K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=1024 destinationCount=1 rate=0 maxPending=2000000 </TQM-Qpid-02-1K>
+ <TQM-Qpid-01-5K>-n TQM-Qpid-01-5K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=5120 destinationCount=1 rate=0 maxPending=2000000 </TQM-Qpid-01-5K>
+ <TQM-Qpid-02-5K>-n TQM-Qpid-02-5K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=5120 destinationCount=1 rate=0 maxPending=2000000 </TQM-Qpid-02-5K>
+ <TQM-Qpid-01-10K>-n TQM-Qpid-01-10K -d10M -s[100] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=10240 destinationCount=1 rate=0 maxPending=2000000 </TQM-Qpid-01-10K>
+ <TQM-Qpid-02-10K>-n TQM-Qpid-02-10K -d10M -s[100] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=10240 destinationCount=1 rate=0 maxPending=2000000 </TQM-Qpid-02-10K>
+ <TQM-Qpid-01-50K>-n TQM-Qpid-01-50K -d10M -s[100] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=51200 destinationCount=1 rate=0 maxPending=20000000</TQM-Qpid-01-50K>
+ <TQM-Qpid-02-50K>-n TQM-Qpid-02-50K -d10M -s[100] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=51200 destinationCount=1 rate=0 maxPending=20000000</TQM-Qpid-02-50K>
+ <TQM-Qpid-01-100K>-n TQM-Qpid-01-100K -d10M -s[40] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=102400 destinationCount=1 rate=0 maxPending=20000000</TQM-Qpid-01-100K>
+ <TQM-Qpid-02-100K>-n TQM-Qpid-02-100K -d10M -s[40] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=102400 destinationCount=1 rate=0 maxPending=20000000</TQM-Qpid-02-100K>
+ <TQM-Qpid-01-500K>-n TQM-Qpid-01-500K -d10M -s[8] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=512000 destinationCount=1 rate=0 maxPending=20000000</TQM-Qpid-01-500K>
+ <TQM-Qpid-02-500K>-n TQM-Qpid-02-500K -d10M -s[8] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=512000 destinationCount=1 rate=0 maxPending=20000000</TQM-Qpid-02-500K>
+ <TQM-Qpid-01-1M>-n TQM-Qpid-01-1M -d10M -s[4] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=1048576 destinationCount=1 rate=0 maxPending=20000000</TQM-Qpid-01-1M>
+ <TQM-Qpid-02-1M>-n TQM-Qpid-02-1M -d10M -s[4] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=1048576 destinationCount=1 rate=0 maxPending=20000000</TQM-Qpid-02-1M>
<!-- Transient, Pub/Sub Tests -->
- <TTR-Qpid-01>-n TTR-Qpid-01 -d10M -s[1000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=1000000 </TTR-Qpid-01>
- <TTR-Qpid-02>-n TTR-Qpid-02 -d10M -s[1000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=1000000 </TTR-Qpid-02>
- <TTR-Qpid-03>-n TTR-Qpid-03 -d24H -s[100000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=true commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=1000000 </TTR-Qpid-03>
- <TTR-Qpid-04>-n TTR-Qpid-04 -d24H -s[100000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=false commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=1000000 </TTR-Qpid-04>
-
- <TTC-Qpid-01>-n TTC-Qpid-01 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=2000 maxPending=1000000 </TTC-Qpid-01>
- <TTC-Qpid-02>-n TTC-Qpid-02 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=2000 maxPending=1000000 </TTC-Qpid-02>
- <TTC-Qpid-03>-n TTC-Qpid-03 -d10M -s[1000] -c[10] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=1000000 </TTC-Qpid-03>
- <TTC-Qpid-04>-n TTC-Qpid-04 -d10M -s[1000] -c[10] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=1000000 </TTC-Qpid-04>
- <TTC-Qpid-05>-n TTC-Qpid-05 -d10M -s[1000] -c[100] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=100000 </TTC-Qpid-05>
- <TTC-Qpid-06>-n TTC-Qpid-06 -d10M -s[1000] -c[100] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=100000 </TTC-Qpid-06>
-
- <TTCL-Qpid-01>-n TTCL-Qpid-01 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=2000 maxPending=1000000 </TTCL-Qpid-01>
- <TTCL-Qpid-02>-n TTCL-Qpid-02 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=2000 maxPending=1000000 </TTCL-Qpid-02>
-
- <TTM-Qpid-01-512b>-n TTM-Qpid-01-512b -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=512 destinationCount=1 rate=0 maxPending=80000000</TTM-Qpid-01-512b>
- <TTM-Qpid-02-512b>-n TTM-Qpid-02-512b -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=512 destinationCount=1 rate=0 maxPending=80000000</TTM-Qpid-02-512b>
- <TTM-Qpid-01-1K>-n TTM-Qpid-01-1K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=1024 destinationCount=1 rate=0 maxPending=80000000</TTM-Qpid-01-1K>
- <TTM-Qpid-02-1K>-n TTM-Qpid-02-1K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=1024 destinationCount=1 rate=0 maxPending=80000000</TTM-Qpid-02-1K>
- <TTM-Qpid-01-5K>-n TTM-Qpid-01-5K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=5120 destinationCount=1 rate=0 maxPending=80000000</TTM-Qpid-01-5K>
- <TTM-Qpid-02-5K>-n TTM-Qpid-02-5K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=5120 destinationCount=1 rate=0 maxPending=80000000</TTM-Qpid-02-5K>
- <TTM-Qpid-01-10K>-n TTM-Qpid-01-10K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=10240 destinationCount=1 rate=0 maxPending=80000000</TTM-Qpid-01-10K>
- <TTM-Qpid-02-10K>-n TTM-Qpid-02-10K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=10240 destinationCount=1 rate=0 maxPending=80000000</TTM-Qpid-02-10K>
- <TTM-Qpid-01-50K>-n TTM-Qpid-01-50K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=51200 destinationCount=1 rate=0 maxPending=80000000</TTM-Qpid-01-50K>
- <TTM-Qpid-02-50K>-n TTM-Qpid-02-50K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=51200 destinationCount=1 rate=0 maxPending=80000000</TTM-Qpid-02-50K>
- <TTM-Qpid-01-100K>-n TTM-Qpid-01-100K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=102400 destinationCount=1 rate=0 maxPending=80000000</TTM-Qpid-01-100K>
- <TTM-Qpid-02-100K>-n TTM-Qpid-02-100K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=102400 destinationCount=1 rate=0 maxPending=80000000</TTM-Qpid-02-100K>
- <TTM-Qpid-01-500K>-n TTM-Qpid-01-500K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=512000 destinationCount=1 rate=0 maxPending=80000000</TTM-Qpid-01-500K>
- <TTM-Qpid-02-500K>-n TTM-Qpid-02-500K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=512000 destinationCount=1 rate=0 maxPending=80000000</TTM-Qpid-02-500K>
- <TTM-Qpid-01-1M>-n TTM-Qpid-01-1M -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=1048576 destinationCount=1 rate=0 maxPending=80000000</TTM-Qpid-01-1M>
- <TTM-Qpid-02-1M>-n TTM-Qpid-02-1M -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=1048476 destinationCount=1 rate=0 maxPending=80000000</TTM-Qpid-02-1M>
+ <TTCT-Qpid-01>-n TTCT-Qpid-01 -d1M -s[10] -c[1,30],samples=30 -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=40 maxPending=2000000 </TTCT-Qpid-01>
+ <TTCT-Qpid-02>-n TTCT-Qpid-02 -d1M -s[10] -c[1,30],samples=30 -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=40 maxPending=2000000 </TTCT-Qpid-02>
+ <TTCL-Qpid-01>-n TTCL-Qpid-01 -d1M -s[10] -c[1,30],samples=30 -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=40 maxPending=2000000 </TTCL-Qpid-01>
+ <TTCL-Qpid-02>-n TTCL-Qpid-02 -d1M -s[10] -c[1,30],samples=30 -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=40 maxPending=2000000 </TTCL-Qpid-02>
+
+ <!-- <TTC-Qpid-05>-n TTC-Qpid-05 -d10M -s[10] -c[100] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=100000 </TTC-Qpid-05> -->
+ <!-- <TTC-Qpid-06>-n TTC-Qpid-06 -d10M -s[10] -c[100] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=100000 </TTC-Qpid-06> -->
+
+ <TTM-Qpid-01-512b>-n TTM-Qpid-01-512b -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </TTM-Qpid-01-512b>
+ <TTM-Qpid-02-512b>-n TTM-Qpid-02-512b -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </TTM-Qpid-02-512b>
+ <TTM-Qpid-01-1K>-n TTM-Qpid-01-1K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=1024 destinationCount=1 rate=0 maxPending=2000000 </TTM-Qpid-01-1K>
+ <TTM-Qpid-02-1K>-n TTM-Qpid-02-1K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=1024 destinationCount=1 rate=0 maxPending=2000000 </TTM-Qpid-02-1K>
+ <TTM-Qpid-01-5K>-n TTM-Qpid-01-5K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=5120 destinationCount=1 rate=0 maxPending=2000000 </TTM-Qpid-01-5K>
+ <TTM-Qpid-02-5K>-n TTM-Qpid-02-5K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=5120 destinationCount=1 rate=0 maxPending=2000000 </TTM-Qpid-02-5K>
+ <TTM-Qpid-01-10K>-n TTM-Qpid-01-10K -d10M -s[100] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=10240 destinationCount=1 rate=0 maxPending=2000000 </TTM-Qpid-01-10K>
+ <TTM-Qpid-02-10K>-n TTM-Qpid-02-10K -d10M -s[100] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=10240 destinationCount=1 rate=0 maxPending=2000000 </TTM-Qpid-02-10K>
+ <TTM-Qpid-01-50K>-n TTM-Qpid-01-50K -d10M -s[100] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=51200 destinationCount=1 rate=0 maxPending=20000000</TTM-Qpid-01-50K>
+ <TTM-Qpid-02-50K>-n TTM-Qpid-02-50K -d10M -s[100] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=51200 destinationCount=1 rate=0 maxPending=20000000</TTM-Qpid-02-50K>
+ <TTM-Qpid-01-100K>-n TTM-Qpid-01-100K -d10M -s[40] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=102400 destinationCount=1 rate=0 maxPending=20000000</TTM-Qpid-01-100K>
+ <TTM-Qpid-02-100K>-n TTM-Qpid-02-100K -d10M -s[40] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=102400 destinationCount=1 rate=0 maxPending=20000000</TTM-Qpid-02-100K>
+ <TTM-Qpid-01-500K>-n TTM-Qpid-01-500K -d10M -s[8] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=512000 destinationCount=1 rate=0 maxPending=20000000</TTM-Qpid-01-500K>
+ <TTM-Qpid-02-500K>-n TTM-Qpid-02-500K -d10M -s[8] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=512000 destinationCount=1 rate=0 maxPending=20000000</TTM-Qpid-02-500K>
+ <TTM-Qpid-01-1M>-n TTM-Qpid-01-1M -d10M -s[4] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=1048576 destinationCount=1 rate=0 maxPending=20000000</TTM-Qpid-01-1M>
+ <TTM-Qpid-02-1M>-n TTM-Qpid-02-1M -d10M -s[4] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=1048476 destinationCount=1 rate=0 maxPending=20000000</TTM-Qpid-02-1M>
<!-- Persistent, P2P Tests -->
- <PQR-Qpid-01>-n PQR-Qpid-01 -d10M -s[1000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=1000000 </PQR-Qpid-01>
- <PQR-Qpid-02>-n PQR-Qpid-02 -d10M -s[1000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=1000000 </PQR-Qpid-02>
- <PQR-Qpid-03>-n PQR-Qpid-03 -d24H -s[100000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=1000000 </PQR-Qpid-03>
- <PQR-Qpid-04>-n PQR-Qpid-04 -d24H -s[100000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=1000000 </PQR-Qpid-04>
-
- <PQC-Qpid-01>-n PQC-Qpid-01 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=600 maxPending=1000000 </PQC-Qpid-01>
- <PQC-Qpid-02>-n PQC-Qpid-02 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=100 maxPending=1000000 </PQC-Qpid-02>
- <PQC-Qpid-03>-n PQC-Qpid-03 -d10M -s[1000] -c[10] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=1000000 </PQC-Qpid-03>
- <PQC-Qpid-04>-n PQC-Qpid-04 -d10M -s[1000] -c[10] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=1000000 </PQC-Qpid-04>
- <PQC-Qpid-05>-n PQC-Qpid-05 -d10M -s[1000] -c[100] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=100000 </PQC-Qpid-05>
- <PQC-Qpid-06>-n PQC-Qpid-06 -d10M -s[1000] -c[100] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=100000 </PQC-Qpid-06>
-
- <PQCL-Qpid-01>-n PQCL-Qpid-01 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=600 maxPending=1000000 </PQCL-Qpid-01>
- <PQCL-Qpid-02>-n PQCL-Qpid-02 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=100 maxPending=1000000 </PQCL-Qpid-02>
-
- <PQM-Qpid-01-512b>-n PQM-Qpid-01-512b -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=512 destinationCount=1 rate=0 maxPending=80000000</PQM-Qpid-01-512b>
- <PQM-Qpid-02-512b>-n PQM-Qpid-02-512b -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=512 destinationCount=1 rate=0 maxPending=80000000</PQM-Qpid-02-512b>
- <PQM-Qpid-01-1K>-n PQM-Qpid-01-1K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=1024 destinationCount=1 rate=0 maxPending=80000000</PQM-Qpid-01-1K>
- <PQM-Qpid-02-1K>-n PQM-Qpid-02-1K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=1024 destinationCount=1 rate=0 maxPending=80000000</PQM-Qpid-02-1K>
- <PQM-Qpid-01-5K>-n PQM-Qpid-01-5K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=5120 destinationCount=1 rate=0 maxPending=80000000</PQM-Qpid-01-5K>
- <PQM-Qpid-02-5K>-n PQM-Qpid-02-5K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=5120 destinationCount=1 rate=0 maxPending=80000000</PQM-Qpid-02-5K>
- <PQM-Qpid-01-10K>-n PQM-Qpid-01-10K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=10240 destinationCount=1 rate=0 maxPending=80000000</PQM-Qpid-01-10K>
- <PQM-Qpid-02-10K>-n PQM-Qpid-02-10K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=10240 destinationCount=1 rate=0 maxPending=80000000</PQM-Qpid-02-10K>
- <PQM-Qpid-01-50K>-n PQM-Qpid-01-50K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=51200 destinationCount=1 rate=0 maxPending=80000000</PQM-Qpid-01-50K>
- <PQM-Qpid-02-50K>-n PQM-Qpid-02-50K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=51200 destinationCount=1 rate=0 maxPending=80000000</PQM-Qpid-02-50K>
- <PQM-Qpid-01-100K>-n PQM-Qpid-01-100K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=102400 destinationCount=1 rate=0 maxPending=80000000</PQM-Qpid-01-100K>
- <PQM-Qpid-02-100K>-n PQM-Qpid-02-100K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=102400 destinationCount=1 rate=0 maxPending=80000000</PQM-Qpid-02-100K>
- <PQM-Qpid-01-500K>-n PQM-Qpid-01-500K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=512000 destinationCount=1 rate=0 maxPending=80000000</PQM-Qpid-01-500K>
- <PQM-Qpid-02-500K>-n PQM-Qpid-02-500K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=512000 destinationCount=1 rate=0 maxPending=80000000</PQM-Qpid-02-500K>
- <PQM-Qpid-01-1M>-n PQM-Qpid-01-1M -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=1048576 destinationCount=1 rate=0 maxPending=80000000</PQM-Qpid-01-1M>
- <PQM-Qpid-02-1M>-n PQM-Qpid-02-1M -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=1048576 destinationCount=1 rate=0 maxPending=80000000</PQM-Qpid-02-1M>
+ <PQCT-Qpid-01>-n PQCT-Qpid-01 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=600 maxPending=2000000 </PQCT-Qpid-01>
+ <PQCT-Qpid-02>-n PQCT-Qpid-02 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=100 maxPending=2000000 </PQCT-Qpid-02>
+ <PQCL-Qpid-01>-n PQCL-Qpid-01 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=600 maxPending=2000000 </PQCL-Qpid-01>
+ <PQCL-Qpid-02>-n PQCL-Qpid-02 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=100 maxPending=2000000 </PQCL-Qpid-02>
+
+ <!-- <PQC-Qpid-05>-n PQC-Qpid-05 -d10M -s[10] -c[100] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=100000 </PQC-Qpid-05> -->
+ <!-- <PQC-Qpid-06>-n PQC-Qpid-06 -d10M -s[10] -c[100] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=100000 </PQC-Qpid-06> -->
+
+ <PQM-Qpid-01-512b>-n PQM-Qpid-01-512b -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </PQM-Qpid-01-512b>
+ <PQM-Qpid-02-512b>-n PQM-Qpid-02-512b -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </PQM-Qpid-02-512b>
+ <PQM-Qpid-01-1K>-n PQM-Qpid-01-1K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=1024 destinationCount=1 rate=0 maxPending=2000000 </PQM-Qpid-01-1K>
+ <PQM-Qpid-02-1K>-n PQM-Qpid-02-1K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=1024 destinationCount=1 rate=0 maxPending=2000000 </PQM-Qpid-02-1K>
+ <PQM-Qpid-01-5K>-n PQM-Qpid-01-5K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=5120 destinationCount=1 rate=0 maxPending=2000000 </PQM-Qpid-01-5K>
+ <PQM-Qpid-02-5K>-n PQM-Qpid-02-5K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=5120 destinationCount=1 rate=0 maxPending=2000000 </PQM-Qpid-02-5K>
+ <PQM-Qpid-01-10K>-n PQM-Qpid-01-10K -d10M -s[100] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=10240 destinationCount=1 rate=0 maxPending=2000000 </PQM-Qpid-01-10K>
+ <PQM-Qpid-02-10K>-n PQM-Qpid-02-10K -d10M -s[100] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=10240 destinationCount=1 rate=0 maxPending=2000000 </PQM-Qpid-02-10K>
+ <PQM-Qpid-01-50K>-n PQM-Qpid-01-50K -d10M -s[100] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=51200 destinationCount=1 rate=0 maxPending=20000000</PQM-Qpid-01-50K>
+ <PQM-Qpid-02-50K>-n PQM-Qpid-02-50K -d10M -s[100] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=51200 destinationCount=1 rate=0 maxPending=20000000</PQM-Qpid-02-50K>
+ <PQM-Qpid-01-100K>-n PQM-Qpid-01-100K -d10M -s[40] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=102400 destinationCount=1 rate=0 maxPending=20000000</PQM-Qpid-01-100K>
+ <PQM-Qpid-02-100K>-n PQM-Qpid-02-100K -d10M -s[40] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=102400 destinationCount=1 rate=0 maxPending=20000000</PQM-Qpid-02-100K>
+ <PQM-Qpid-01-500K>-n PQM-Qpid-01-500K -d10M -s[8] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=512000 destinationCount=1 rate=0 maxPending=20000000</PQM-Qpid-01-500K>
+ <PQM-Qpid-02-500K>-n PQM-Qpid-02-500K -d10M -s[8] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=512000 destinationCount=1 rate=0 maxPending=20000000</PQM-Qpid-02-500K>
+ <PQM-Qpid-01-1M>-n PQM-Qpid-01-1M -d10M -s[4] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=1048576 destinationCount=1 rate=0 maxPending=20000000</PQM-Qpid-01-1M>
+ <PQM-Qpid-02-1M>-n PQM-Qpid-02-1M -d10M -s[4] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=1048576 destinationCount=1 rate=0 maxPending=20000000</PQM-Qpid-02-1M>
<!-- Persistent, Pub/Sub Tests -->
- <PTR-Qpid-01>-n PTR-Qpid-01 -d10M -s[1000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=1000000 </PTR-Qpid-01>
- <PTR-Qpid-02>-n PTR-Qpid-02 -d10M -s[1000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=1000000 </PTR-Qpid-02>
- <PTR-Qpid-03>-n PTR-Qpid-03 -d24H -s[100000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=true commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=1000000 </PTR-Qpid-03>
- <PTR-Qpid-04>-n PTR-Qpid-04 -d24H -s[100000] -c[16] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=false commitBatchSize=10 batchSize=100000 messageSize=256 destinationCount=1 rate=0 maxPending=1000000 </PTR-Qpid-04>
-
- <PTC-Qpid-01>-n PTC-Qpid-01 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=600 maxPending=1000000 </PTC-Qpid-01>
- <PTC-Qpid-02>-n PTC-Qpid-02 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=100 maxPending=1000000 </PTC-Qpid-02>
- <PTC-Qpid-03>-n PTC-Qpid-03 -d10M -s[1000] -c[10] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=1000000 </PTC-Qpid-03>
- <PTC-Qpid-04>-n PTC-Qpid-04 -d10M -s[1000] -c[10] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=1000000 </PTC-Qpid-04>
- <PTC-Qpid-05>-n PTC-Qpid-05 -d10M -s[1000] -c[100] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=100000 </PTC-Qpid-05>
- <PTC-Qpid-06>-n PTC-Qpid-06 -d10M -s[1000] -c[100] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=100000 </PTC-Qpid-06>
-
- <PTCL-Qpid-01>-n PTCL-Qpid-01 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=600 maxPending=1000000 </PTCL-Qpid-01>
- <PTCL-Qpid-02>-n PTCL-Qpid-02 -d1M -s[1000] -c[1,30],samples=30 -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=100 maxPending=1000000 </PTCL-Qpid-02>
-
- <PTM-Qpid-01-512b>-n PTM-Qpid-01-512b -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=512 destinationCount=1 rate=0 maxPending=80000000</PTM-Qpid-01-512b>
- <PTM-Qpid-02-512b>-n PTM-Qpid-02-512b -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=512 destinationCount=1 rate=0 maxPending=80000000</PTM-Qpid-02-512b>
- <PTM-Qpid-01-1K>-n PTM-Qpid-01-1K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=1024 destinationCount=1 rate=0 maxPending=80000000</PTM-Qpid-01-1K>
- <PTM-Qpid-02-1K>-n PTM-Qpid-02-1K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=1024 destinationCount=1 rate=0 maxPending=80000000</PTM-Qpid-02-1K>
- <PTM-Qpid-01-5K>-n PTM-Qpid-01-5K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=5120 destinationCount=1 rate=0 maxPending=80000000</PTM-Qpid-01-5K>
- <PTM-Qpid-02-5K>-n PTM-Qpid-02-5K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=5120 destinationCount=1 rate=0 maxPending=80000000</PTM-Qpid-02-5K>
- <PTM-Qpid-01-10K>-n PTM-Qpid-01-10K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=10240 destinationCount=1 rate=0 maxPending=80000000</PTM-Qpid-01-10K>
- <PTM-Qpid-02-10K>-n PTM-Qpid-02-10K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=10240 destinationCount=1 rate=0 maxPending=80000000</PTM-Qpid-02-10K>
- <PTM-Qpid-01-50K>-n PTM-Qpid-01-50K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=51200 destinationCount=1 rate=0 maxPending=80000000</PTM-Qpid-01-50K>
- <PTM-Qpid-02-50K>-n PTM-Qpid-02-50K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=51200 destinationCount=1 rate=0 maxPending=80000000</PTM-Qpid-02-50K>
- <PTM-Qpid-01-100K>-n PTM-Qpid-01-100K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=102400 destinationCount=1 rate=0 maxPending=80000000</PTM-Qpid-01-100K>
- <PTM-Qpid-02-100K>-n PTM-Qpid-02-100K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=102400 destinationCount=1 rate=0 maxPending=80000000</PTM-Qpid-02-100K>
- <PTM-Qpid-01-500K>-n PTM-Qpid-01-500K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=512000 destinationCount=1 rate=0 maxPending=80000000</PTM-Qpid-01-500K>
- <PTM-Qpid-02-500K>-n PTM-Qpid-02-500K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=512000 destinationCount=1 rate=0 maxPending=80000000</PTM-Qpid-02-500K>
- <PTM-Qpid-01-1M>-n PTM-Qpid-01-1M -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=1048576 destinationCount=1 rate=0 maxPending=80000000</PTM-Qpid-01-1M>
- <PTM-Qpid-02-1M>-n PTM-Qpid-02-1M -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=1048476 destinationCount=1 rate=0 maxPending=80000000</PTM-Qpid-02-1M>
+ <PTCT-Qpid-01>-n PTCT-Qpid-01 -d1M -s[1] -c[1,30],samples=30 -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=1 maxPending=2000000 </PTCT-Qpid-01>
+ <PTCT-Qpid-02>-n PTCT-Qpid-02 -d1M -s[1] -c[1,30],samples=30 -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=1 maxPending=2000000 </PTCT-Qpid-02>
+ <PTCL-Qpid-01>-n PTCL-Qpid-01 -d1M -s[1] -c[1,30],samples=30 -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=1 maxPending=2000000 </PTCL-Qpid-01>
+ <PTCL-Qpid-02>-n PTCL-Qpid-02 -d1M -s[1] -c[1,30],samples=30 -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=1 rate=1 maxPending=2000000 </PTCL-Qpid-02>
+
+ <!-- <PTC-Qpid-05>-n PTC-Qpid-05 -d10M -s[10] -c[100] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=100000 </PTC-Qpid-05> -->
+ <!-- <PTC-Qpid-06>-n PTC-Qpid-06 -d10M -s[10] -c[100] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=256 destinationCount=10 rate=0 maxPending=100000 </PTC-Qpid-06> -->
+
+ <PTM-Qpid-01-512b>-n PTM-Qpid-01-512b -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </PTM-Qpid-01-512b>
+ <PTM-Qpid-02-512b>-n PTM-Qpid-02-512b -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </PTM-Qpid-02-512b>
+ <PTM-Qpid-01-1K>-n PTM-Qpid-01-1K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=1024 destinationCount=1 rate=0 maxPending=2000000 </PTM-Qpid-01-1K>
+ <PTM-Qpid-02-1K>-n PTM-Qpid-02-1K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=1024 destinationCount=1 rate=0 maxPending=2000000 </PTM-Qpid-02-1K>
+ <PTM-Qpid-01-5K>-n PTM-Qpid-01-5K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=5120 destinationCount=1 rate=0 maxPending=2000000 </PTM-Qpid-01-5K>
+ <PTM-Qpid-02-5K>-n PTM-Qpid-02-5K -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=5120 destinationCount=1 rate=0 maxPending=2000000 </PTM-Qpid-02-5K>
+ <PTM-Qpid-01-10K>-n PTM-Qpid-01-10K -d10M -s[100] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=10240 destinationCount=1 rate=0 maxPending=2000000 </PTM-Qpid-01-10K>
+ <PTM-Qpid-02-10K>-n PTM-Qpid-02-10K -d10M -s[100] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=10240 destinationCount=1 rate=0 maxPending=2000000 </PTM-Qpid-02-10K>
+ <PTM-Qpid-01-50K>-n PTM-Qpid-01-50K -d10M -s[100] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=51200 destinationCount=1 rate=0 maxPending=20000000</PTM-Qpid-01-50K>
+ <PTM-Qpid-02-50K>-n PTM-Qpid-02-50K -d10M -s[100] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=51200 destinationCount=1 rate=0 maxPending=20000000</PTM-Qpid-02-50K>
+ <PTM-Qpid-01-100K>-n PTM-Qpid-01-100K -d10M -s[40] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=102400 destinationCount=1 rate=0 maxPending=20000000</PTM-Qpid-01-100K>
+ <PTM-Qpid-02-100K>-n PTM-Qpid-02-100K -d10M -s[40] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=102400 destinationCount=1 rate=0 maxPending=20000000</PTM-Qpid-02-100K>
+ <PTM-Qpid-01-500K>-n PTM-Qpid-01-500K -d10M -s[8] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=512000 destinationCount=1 rate=0 maxPending=20000000</PTM-Qpid-01-500K>
+ <PTM-Qpid-02-500K>-n PTM-Qpid-02-500K -d10M -s[8] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=512000 destinationCount=1 rate=0 maxPending=20000000</PTM-Qpid-02-500K>
+ <PTM-Qpid-01-1M>-n PTM-Qpid-01-1M -d10M -s[4] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=true consTransacted=true consAckMode=0 commitBatchSize=10 batchSize=1000 messageSize=1048576 destinationCount=1 rate=0 maxPending=20000000</PTM-Qpid-01-1M>
+ <PTM-Qpid-02-1M>-n PTM-Qpid-02-1M -d10M -s[4] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true uniqueDests=false numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=10 batchSize=1000 messageSize=1048476 destinationCount=1 rate=0 maxPending=20000000</PTM-Qpid-02-1M>
<!-- Benchmarking Tests for P2P. -->
<!--
@@ -337,61 +354,61 @@
No rate limiting.
Message size 256 bytes.
-->
- <TQBT-Qpid-01-1C> -n TQBT-Qpid-01-1C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=1 </TQBT-Qpid-01-1C>
- <TQBT-Qpid-01-2C> -n TQBT-Qpid-01-2C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=2 </TQBT-Qpid-01-2C>
- <TQBT-Qpid-01-4C> -n TQBT-Qpid-01-4C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=4 </TQBT-Qpid-01-4C>
- <TQBT-Qpid-01-8C> -n TQBT-Qpid-01-8C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=8 </TQBT-Qpid-01-8C>
- <TQBT-Qpid-01-16C>-n TQBT-Qpid-01-16C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=16</TQBT-Qpid-01-16C>
- <TQBT-Qpid-01-32C>-n TQBT-Qpid-01-32C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=32</TQBT-Qpid-01-32C>
-
- <TQBT-Qpid-02-1C> -n TQBT-Qpid-02-1C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=1 </TQBT-Qpid-02-1C>
- <TQBT-Qpid-02-2C> -n TQBT-Qpid-02-2C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=2 </TQBT-Qpid-02-2C>
- <TQBT-Qpid-02-4C> -n TQBT-Qpid-02-4C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=4 </TQBT-Qpid-02-4C>
- <TQBT-Qpid-02-8C> -n TQBT-Qpid-02-8C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=8 </TQBT-Qpid-02-8C>
- <TQBT-Qpid-02-16C>-n TQBT-Qpid-02-16C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=16</TQBT-Qpid-02-16C>
- <TQBT-Qpid-02-32C>-n TQBT-Qpid-02-32C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=32</TQBT-Qpid-02-32C>
-
- <PQBT-Qpid-01-1C> -n PQBT-Qpid-01-1C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=1 </PQBT-Qpid-01-1C>
- <PQBT-Qpid-01-2C> -n PQBT-Qpid-01-2C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=2 </PQBT-Qpid-01-2C>
- <PQBT-Qpid-01-4C> -n PQBT-Qpid-01-4C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=4 </PQBT-Qpid-01-4C>
- <PQBT-Qpid-01-8C> -n PQBT-Qpid-01-8C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=8 </PQBT-Qpid-01-8C>
- <PQBT-Qpid-01-16C>-n PQBT-Qpid-01-16C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=16</PQBT-Qpid-01-16C>
- <PQBT-Qpid-01-32C>-n PQBT-Qpid-01-32C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=32</PQBT-Qpid-01-32C>
-
- <PQBT-Qpid-02-1C> -n PQBT-Qpid-02-1C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=1 </PQBT-Qpid-02-1C>
- <PQBT-Qpid-02-2C> -n PQBT-Qpid-02-2C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=2 </PQBT-Qpid-02-2C>
- <PQBT-Qpid-02-4C> -n PQBT-Qpid-02-4C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=4 </PQBT-Qpid-02-4C>
- <PQBT-Qpid-02-8C> -n PQBT-Qpid-02-8C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=8 </PQBT-Qpid-02-8C>
- <PQBT-Qpid-02-16C>-n PQBT-Qpid-02-16C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=16</PQBT-Qpid-02-16C>
- <PQBT-Qpid-02-32C>-n PQBT-Qpid-02-32C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=32</PQBT-Qpid-02-32C>
-
- <TQBL-Qpid-01-1C> -n TQBL-Qpid-01-1C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=1 </TQBL-Qpid-01-1C>
- <TQBL-Qpid-01-2C> -n TQBL-Qpid-01-2C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=2 </TQBL-Qpid-01-2C>
- <TQBL-Qpid-01-4C> -n TQBL-Qpid-01-4C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=4 </TQBL-Qpid-01-4C>
- <TQBL-Qpid-01-8C> -n TQBL-Qpid-01-8C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=8 </TQBL-Qpid-01-8C>
- <TQBL-Qpid-01-16C>-n TQBL-Qpid-01-16C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=16</TQBL-Qpid-01-16C>
- <TQBL-Qpid-01-32C>-n TQBL-Qpid-01-32C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=32</TQBL-Qpid-01-32C>
-
- <TQBL-Qpid-02-1C> -n TQBL-Qpid-02-1C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=1 </TQBL-Qpid-02-1C>
- <TQBL-Qpid-02-2C> -n TQBL-Qpid-02-2C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=2 </TQBL-Qpid-02-2C>
- <TQBL-Qpid-02-4C> -n TQBL-Qpid-02-4C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=4 </TQBL-Qpid-02-4C>
- <TQBL-Qpid-02-8C> -n TQBL-Qpid-02-8C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=8 </TQBL-Qpid-02-8C>
- <TQBL-Qpid-02-16C>-n TQBL-Qpid-02-16C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=16</TQBL-Qpid-02-16C>
- <TQBL-Qpid-02-32C>-n TQBL-Qpid-02-32C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=32</TQBL-Qpid-02-32C>
-
- <PQBL-Qpid-01-1C> -n PQBL-Qpid-01-1C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=1 </PQBL-Qpid-01-1C>
- <PQBL-Qpid-01-2C> -n PQBL-Qpid-01-2C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=2 </PQBL-Qpid-01-2C>
- <PQBL-Qpid-01-4C> -n PQBL-Qpid-01-4C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=4 </PQBL-Qpid-01-4C>
- <PQBL-Qpid-01-8C> -n PQBL-Qpid-01-8C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=8 </PQBL-Qpid-01-8C>
- <PQBL-Qpid-01-16C>-n PQBL-Qpid-01-16C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=16</PQBL-Qpid-01-16C>
- <PQBL-Qpid-01-32C>-n PQBL-Qpid-01-32C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=32</PQBL-Qpid-01-32C>
-
- <PQBL-Qpid-02-1C> -n PQBL-Qpid-02-1C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=1 </PQBL-Qpid-02-1C>
- <PQBL-Qpid-02-2C> -n PQBL-Qpid-02-2C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=2 </PQBL-Qpid-02-2C>
- <PQBL-Qpid-02-4C> -n PQBL-Qpid-02-4C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=4 </PQBL-Qpid-02-4C>
- <PQBL-Qpid-02-8C> -n PQBL-Qpid-02-8C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=8 </PQBL-Qpid-02-8C>
- <PQBL-Qpid-02-16C>-n PQBL-Qpid-02-16C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=16</PQBL-Qpid-02-16C>
- <PQBL-Qpid-02-32C>-n PQBL-Qpid-02-32C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false consTransacted=false numConsumers=32</PQBL-Qpid-02-32C>
+ <TQBT-Qpid-01-1C> -n TQBT-Qpid-01-1C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-01-1C>
+ <TQBT-Qpid-01-2C> -n TQBT-Qpid-01-2C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=2 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-01-2C>
+ <TQBT-Qpid-01-4C> -n TQBT-Qpid-01-4C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=4 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-01-4C>
+ <TQBT-Qpid-01-8C> -n TQBT-Qpid-01-8C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=8 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-01-8C>
+ <TQBT-Qpid-01-16C>-n TQBT-Qpid-01-16C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=16 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-01-16C>
+ <TQBT-Qpid-01-32C>-n TQBT-Qpid-01-32C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=32 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-01-32C>
+
+ <TQBT-Qpid-02-1C> -n TQBT-Qpid-02-1C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-02-1C>
+ <TQBT-Qpid-02-2C> -n TQBT-Qpid-02-2C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=2 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-02-2C>
+ <TQBT-Qpid-02-4C> -n TQBT-Qpid-02-4C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=4 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-02-4C>
+ <TQBT-Qpid-02-8C> -n TQBT-Qpid-02-8C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=8 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-02-8C>
+ <TQBT-Qpid-02-16C>-n TQBT-Qpid-02-16C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=16 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-02-16C>
+ <TQBT-Qpid-02-32C>-n TQBT-Qpid-02-32C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=32 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-02-32C>
+
+ <PQBT-Qpid-01-1C> -n PQBT-Qpid-01-1C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-01-1C>
+ <PQBT-Qpid-01-2C> -n PQBT-Qpid-01-2C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=2 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-01-2C>
+ <PQBT-Qpid-01-4C> -n PQBT-Qpid-01-4C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=4 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-01-4C>
+ <PQBT-Qpid-01-8C> -n PQBT-Qpid-01-8C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=8 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-01-8C>
+ <PQBT-Qpid-01-16C>-n PQBT-Qpid-01-16C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=16 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-01-16C>
+ <PQBT-Qpid-01-32C>-n PQBT-Qpid-01-32C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=32 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-01-32C>
+
+ <PQBT-Qpid-02-1C> -n PQBT-Qpid-02-1C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-02-1C>
+ <PQBT-Qpid-02-2C> -n PQBT-Qpid-02-2C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=2 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-02-2C>
+ <PQBT-Qpid-02-4C> -n PQBT-Qpid-02-4C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=4 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-02-4C>
+ <PQBT-Qpid-02-8C> -n PQBT-Qpid-02-8C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=8 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-02-8C>
+ <PQBT-Qpid-02-16C>-n PQBT-Qpid-02-16C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=16 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-02-16C>
+ <PQBT-Qpid-02-32C>-n PQBT-Qpid-02-32C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=32 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-02-32C>
+
+ <TQBL-Qpid-01-1C> -n TQBL-Qpid-01-1C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-01-1C>
+ <TQBL-Qpid-01-2C> -n TQBL-Qpid-01-2C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=2 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-01-2C>
+ <TQBL-Qpid-01-4C> -n TQBL-Qpid-01-4C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=4 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-01-4C>
+ <TQBL-Qpid-01-8C> -n TQBL-Qpid-01-8C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=8 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-01-8C>
+ <TQBL-Qpid-01-16C>-n TQBL-Qpid-01-16C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=16 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-01-16C>
+ <TQBL-Qpid-01-32C>-n TQBL-Qpid-01-32C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=32 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-01-32C>
+
+ <TQBL-Qpid-02-1C> -n TQBL-Qpid-02-1C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-02-1C>
+ <TQBL-Qpid-02-2C> -n TQBL-Qpid-02-2C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=2 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-02-2C>
+ <TQBL-Qpid-02-4C> -n TQBL-Qpid-02-4C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=4 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-02-4C>
+ <TQBL-Qpid-02-8C> -n TQBL-Qpid-02-8C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=8 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-02-8C>
+ <TQBL-Qpid-02-16C>-n TQBL-Qpid-02-16C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=16 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-02-16C>
+ <TQBL-Qpid-02-32C>-n TQBL-Qpid-02-32C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=32 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-02-32C>
+
+ <PQBL-Qpid-01-1C> -n PQBL-Qpid-01-1C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-01-1C>
+ <PQBL-Qpid-01-2C> -n PQBL-Qpid-01-2C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=2 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-01-2C>
+ <PQBL-Qpid-01-4C> -n PQBL-Qpid-01-4C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=4 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-01-4C>
+ <PQBL-Qpid-01-8C> -n PQBL-Qpid-01-8C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=8 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-01-8C>
+ <PQBL-Qpid-01-16C>-n PQBL-Qpid-01-16C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=16 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-01-16C>
+ <PQBL-Qpid-01-32C>-n PQBL-Qpid-01-32C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=32 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-01-32C>
+
+ <PQBL-Qpid-02-1C> -n PQBL-Qpid-02-1C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-02-1C>
+ <PQBL-Qpid-02-2C> -n PQBL-Qpid-02-2C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=2 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-02-2C>
+ <PQBL-Qpid-02-4C> -n PQBL-Qpid-02-4C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=4 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-02-4C>
+ <PQBL-Qpid-02-8C> -n PQBL-Qpid-02-8C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=8 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-02-8C>
+ <PQBL-Qpid-02-16C>-n PQBL-Qpid-02-16C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=16 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-02-16C>
+ <PQBL-Qpid-02-32C>-n PQBL-Qpid-02-32C -d1M -s[1000] -c[1] -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=32 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-02-32C>
<!--
Bench mark 2. P2P messaging 1:1, scaled up from 1 to 32 times. Queues not shared, just one to one throughput.
@@ -400,93 +417,93 @@
No rate limiting.
Message size from 128 bytes to 1 Meg.
-->
- <TQBT-Qpid-03-128b>-n TQBT-Qpid-03-128b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBT-Qpid-03-128b>
- <TQBT-Qpid-03-256b>-n TQBT-Qpid-03-256b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBT-Qpid-03-256b>
- <TQBT-Qpid-03-512b>-n TQBT-Qpid-03-512b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBT-Qpid-03-512b>
- <TQBT-Qpid-03-1K>-n TQBT-Qpid-03-1K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=1024 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBT-Qpid-03-1K>
- <TQBT-Qpid-03-5K>-n TQBT-Qpid-03-5K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=5120 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBT-Qpid-03-5K>
- <TQBT-Qpid-03-10K>-n TQBT-Qpid-03-10K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=10240 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBT-Qpid-03-10K>
- <TQBT-Qpid-03-50K>-n TQBT-Qpid-03-50K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=51200 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBT-Qpid-03-50K>
- <TQBT-Qpid-03-100K>-n TQBT-Qpid-03-100K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=102400 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBT-Qpid-03-100K>
- <TQBT-Qpid-03-500K>-n TQBT-Qpid-03-500K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=512000 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBT-Qpid-03-500K>
- <TQBT-Qpid-03-1M>-n TQBT-Qpid-03-1M -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=1048576 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBT-Qpid-03-1M>
-
- <TQBT-Qpid-04-128b>-n TQBT-Qpid-04-128b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBT-Qpid-04-128b>
- <TQBT-Qpid-04-256b>-n TQBT-Qpid-04-256b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBT-Qpid-04-256b>
- <TQBT-Qpid-04-512b>-n TQBT-Qpid-04-512b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBT-Qpid-04-512b>
- <TQBT-Qpid-04-1K>-n TQBT-Qpid-04-1K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=1024 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBT-Qpid-04-1K>
- <TQBT-Qpid-04-5K>-n TQBT-Qpid-04-5K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=5120 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBT-Qpid-04-5K>
- <TQBT-Qpid-04-10K>-n TQBT-Qpid-04-10K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=10240 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBT-Qpid-04-10K>
- <TQBT-Qpid-04-50K>-n TQBT-Qpid-04-50K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=51200 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBT-Qpid-04-50K>
- <TQBT-Qpid-04-100K>-n TQBT-Qpid-04-100K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=102400 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBT-Qpid-04-100K>
- <TQBT-Qpid-04-500K>-n TQBT-Qpid-04-500K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=512000 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBT-Qpid-04-500K>
- <TQBT-Qpid-04-1M>-n TQBT-Qpid-04-1M -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=1048576 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBT-Qpid-04-1M>
-
- <PQBT-Qpid-03-128b>-n PQBT-Qpid-03-128b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBT-Qpid-03-128b>
- <PQBT-Qpid-03-256b>-n PQBT-Qpid-03-256b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBT-Qpid-03-256b>
- <PQBT-Qpid-03-512b>-n PQBT-Qpid-03-512b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBT-Qpid-03-512b>
- <PQBT-Qpid-03-1K>-n PQBT-Qpid-03-1K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=1024 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBT-Qpid-03-1K>
- <PQBT-Qpid-03-5K>-n PQBT-Qpid-03-5K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=5120 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBT-Qpid-03-5K>
- <PQBT-Qpid-03-10K>-n PQBT-Qpid-03-10K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=10240 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBT-Qpid-03-10K>
- <PQBT-Qpid-03-50K>-n PQBT-Qpid-03-50K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=51200 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBT-Qpid-03-50K>
- <PQBT-Qpid-03-100K>-n PQBT-Qpid-03-100K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=102400 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBT-Qpid-03-100K>
- <PQBT-Qpid-03-500K>-n PQBT-Qpid-03-500K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=512000 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBT-Qpid-03-500K>
- <PQBT-Qpid-03-1M>-n PQBT-Qpid-03-1M -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=1048576 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBT-Qpid-03-1M>
-
- <PQBT-Qpid-04-128b>-n PQBT-Qpid-04-128b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBT-Qpid-04-128b>
- <PQBT-Qpid-04-256b>-n PQBT-Qpid-04-256b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBT-Qpid-04-256b>
- <PQBT-Qpid-04-512b>-n PQBT-Qpid-04-512b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBT-Qpid-04-512b>
- <PQBT-Qpid-04-1K>-n PQBT-Qpid-04-1K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=1024 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBT-Qpid-04-1K>
- <PQBT-Qpid-04-5K>-n PQBT-Qpid-04-5K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=5120 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBT-Qpid-04-5K>
- <PQBT-Qpid-04-10K>-n PQBT-Qpid-04-10K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=10240 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBT-Qpid-04-10K>
- <PQBT-Qpid-04-50K>-n PQBT-Qpid-04-50K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=51200 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBT-Qpid-04-50K>
- <PQBT-Qpid-04-100K>-n PQBT-Qpid-04-100K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=102400 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBT-Qpid-04-100K>
- <PQBT-Qpid-04-500K>-n PQBT-Qpid-04-500K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=512000 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBT-Qpid-04-500K>
- <PQBT-Qpid-04-1M>-n PQBT-Qpid-04-1M -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=1048576 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBT-Qpid-04-1M>
-
- <TQBL-Qpid-03-128b>-n TQBL-Qpid-03-128b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBL-Qpid-03-128b>
- <TQBL-Qpid-03-256b>-n TQBL-Qpid-03-256b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBL-Qpid-03-256b>
- <TQBL-Qpid-03-512b>-n TQBL-Qpid-03-512b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBL-Qpid-03-512b>
- <TQBL-Qpid-03-1K>-n TQBL-Qpid-03-1K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=1024 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBL-Qpid-03-1K>
- <TQBL-Qpid-03-5K>-n TQBL-Qpid-03-5K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=5120 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBL-Qpid-03-5K>
- <TQBL-Qpid-03-10K>-n TQBL-Qpid-03-10K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=10240 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBL-Qpid-03-10K>
- <TQBL-Qpid-03-50K>-n TQBL-Qpid-03-50K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=51200 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBL-Qpid-03-50K>
- <TQBL-Qpid-03-100K>-n TQBL-Qpid-03-100K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=102400 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBL-Qpid-03-100K>
- <TQBL-Qpid-03-500K>-n TQBL-Qpid-03-500K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=512000 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBL-Qpid-03-500K>
- <TQBL-Qpid-03-1M>-n TQBL-Qpid-03-1M -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=1048576 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBL-Qpid-03-1M>
-
- <TQBL-Qpid-04-128b>-n TQBL-Qpid-04-128b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBL-Qpid-04-128b>
- <TQBL-Qpid-04-256b>-n TQBL-Qpid-04-256b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBL-Qpid-04-256b>
- <TQBL-Qpid-04-512b>-n TQBL-Qpid-04-512b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBL-Qpid-04-512b>
- <TQBL-Qpid-04-1K>-n TQBL-Qpid-04-1K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=1024 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBL-Qpid-04-1K>
- <TQBL-Qpid-04-5K>-n TQBL-Qpid-04-5K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=5120 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBL-Qpid-04-5K>
- <TQBL-Qpid-04-10K>-n TQBL-Qpid-04-10K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=10240 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBL-Qpid-04-10K>
- <TQBL-Qpid-04-50K>-n TQBL-Qpid-04-50K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=51200 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBL-Qpid-04-50K>
- <TQBL-Qpid-04-100K>-n TQBL-Qpid-04-100K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=102400 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBL-Qpid-04-100K>
- <TQBL-Qpid-04-500K>-n TQBL-Qpid-04-500K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=512000 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBL-Qpid-04-500K>
- <TQBL-Qpid-04-1M>-n TQBL-Qpid-04-1M -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=1048576 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </TQBL-Qpid-04-1M>
-
- <PQBL-Qpid-03-128b>-n PQBL-Qpid-03-128b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBL-Qpid-03-128b>
- <PQBL-Qpid-03-256b>-n PQBL-Qpid-03-256b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBL-Qpid-03-256b>
- <PQBL-Qpid-03-512b>-n PQBL-Qpid-03-512b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBL-Qpid-03-512b>
- <PQBL-Qpid-03-1K>-n PQBL-Qpid-03-1K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=1024 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBL-Qpid-03-1K>
- <PQBL-Qpid-03-5K>-n PQBL-Qpid-03-5K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=5120 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBL-Qpid-03-5K>
- <PQBL-Qpid-03-10K>-n PQBL-Qpid-03-10K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=10240 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBL-Qpid-03-10K>
- <PQBL-Qpid-03-50K>-n PQBL-Qpid-03-50K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=51200 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBL-Qpid-03-50K>
- <PQBL-Qpid-03-100K>-n PQBL-Qpid-03-100K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=102400 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBL-Qpid-03-100K>
- <PQBL-Qpid-03-500K>-n PQBL-Qpid-03-500K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=512000 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBL-Qpid-03-500K>
- <PQBL-Qpid-03-1M>-n PQBL-Qpid-03-1M -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=100 messageSize=1048576 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBL-Qpid-03-1M>
-
- <PQBL-Qpid-04-128b>-n PQBL-Qpid-04-128b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBL-Qpid-04-128b>
- <PQBL-Qpid-04-256b>-n PQBL-Qpid-04-256b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBL-Qpid-04-256b>
- <PQBL-Qpid-04-512b>-n PQBL-Qpid-04-512b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBL-Qpid-04-512b>
- <PQBL-Qpid-04-1K>-n PQBL-Qpid-04-1K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=1024 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBL-Qpid-04-1K>
- <PQBL-Qpid-04-5K>-n PQBL-Qpid-04-5K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=5120 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBL-Qpid-04-5K>
- <PQBL-Qpid-04-10K>-n PQBL-Qpid-04-10K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=10240 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBL-Qpid-04-10K>
- <PQBL-Qpid-04-50K>-n PQBL-Qpid-04-50K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=51200 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBL-Qpid-04-50K>
- <PQBL-Qpid-04-100K>-n PQBL-Qpid-04-100K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=102400 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBL-Qpid-04-100K>
- <PQBL-Qpid-04-500K>-n PQBL-Qpid-04-500K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=512000 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBL-Qpid-04-500K>
- <PQBL-Qpid-04-1M>-n PQBL-Qpid-04-1M -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=100 messageSize=1048576 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=true consTransacted=false numConsumers=1 </PQBL-Qpid-04-1M>
+ <TQBT-Qpid-03-128b>-n TQBT-Qpid-03-128b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-03-128b>
+ <TQBT-Qpid-03-256b>-n TQBT-Qpid-03-256b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-03-256b>
+ <TQBT-Qpid-03-512b>-n TQBT-Qpid-03-512b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-03-512b>
+ <TQBT-Qpid-03-1K>-n TQBT-Qpid-03-1K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=1024 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-03-1K>
+ <TQBT-Qpid-03-5K>-n TQBT-Qpid-03-5K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=5120 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-03-5K>
+ <TQBT-Qpid-03-10K>-n TQBT-Qpid-03-10K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=10240 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-03-10K>
+ <TQBT-Qpid-03-50K>-n TQBT-Qpid-03-50K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=51200 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-03-50K>
+ <TQBT-Qpid-03-100K>-n TQBT-Qpid-03-100K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=102400 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-03-100K>
+ <TQBT-Qpid-03-500K>-n TQBT-Qpid-03-500K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512000 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-03-500K>
+ <TQBT-Qpid-03-1M>-n TQBT-Qpid-03-1M -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=1048576 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-03-1M>
+
+ <TQBT-Qpid-04-128b>-n TQBT-Qpid-04-128b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-04-128b>
+ <TQBT-Qpid-04-256b>-n TQBT-Qpid-04-256b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-04-256b>
+ <TQBT-Qpid-04-512b>-n TQBT-Qpid-04-512b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-04-512b>
+ <TQBT-Qpid-04-1K>-n TQBT-Qpid-04-1K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=1024 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-04-1K>
+ <TQBT-Qpid-04-5K>-n TQBT-Qpid-04-5K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=5120 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-04-5K>
+ <TQBT-Qpid-04-10K>-n TQBT-Qpid-04-10K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=10240 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-04-10K>
+ <TQBT-Qpid-04-50K>-n TQBT-Qpid-04-50K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=51200 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-04-50K>
+ <TQBT-Qpid-04-100K>-n TQBT-Qpid-04-100K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=102400 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-04-100K>
+ <TQBT-Qpid-04-500K>-n TQBT-Qpid-04-500K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512000 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-04-500K>
+ <TQBT-Qpid-04-1M>-n TQBT-Qpid-04-1M -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=1048576 destinationCount=1 rate=0 maxPending=2000000 </TQBT-Qpid-04-1M>
+
+ <PQBT-Qpid-03-128b>-n PQBT-Qpid-03-128b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-03-128b>
+ <PQBT-Qpid-03-256b>-n PQBT-Qpid-03-256b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-03-256b>
+ <PQBT-Qpid-03-512b>-n PQBT-Qpid-03-512b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-03-512b>
+ <PQBT-Qpid-03-1K>-n PQBT-Qpid-03-1K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=1024 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-03-1K>
+ <PQBT-Qpid-03-5K>-n PQBT-Qpid-03-5K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=5120 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-03-5K>
+ <PQBT-Qpid-03-10K>-n PQBT-Qpid-03-10K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=10240 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-03-10K>
+ <PQBT-Qpid-03-50K>-n PQBT-Qpid-03-50K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=51200 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-03-50K>
+ <PQBT-Qpid-03-100K>-n PQBT-Qpid-03-100K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=102400 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-03-100K>
+ <PQBT-Qpid-03-500K>-n PQBT-Qpid-03-500K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512000 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-03-500K>
+ <PQBT-Qpid-03-1M>-n PQBT-Qpid-03-1M -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=1048576 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-03-1M>
+
+ <PQBT-Qpid-04-128b>-n PQBT-Qpid-04-128b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-04-128b>
+ <PQBT-Qpid-04-256b>-n PQBT-Qpid-04-256b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-04-256b>
+ <PQBT-Qpid-04-512b>-n PQBT-Qpid-04-512b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-04-512b>
+ <PQBT-Qpid-04-1K>-n PQBT-Qpid-04-1K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=1024 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-04-1K>
+ <PQBT-Qpid-04-5K>-n PQBT-Qpid-04-5K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=5120 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-04-5K>
+ <PQBT-Qpid-04-10K>-n PQBT-Qpid-04-10K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=10240 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-04-10K>
+ <PQBT-Qpid-04-50K>-n PQBT-Qpid-04-50K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=51200 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-04-50K>
+ <PQBT-Qpid-04-100K>-n PQBT-Qpid-04-100K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=102400 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-04-100K>
+ <PQBT-Qpid-04-500K>-n PQBT-Qpid-04-500K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512000 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-04-500K>
+ <PQBT-Qpid-04-1M>-n PQBT-Qpid-04-1M -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=1048576 destinationCount=1 rate=0 maxPending=2000000 </PQBT-Qpid-04-1M>
+
+ <TQBL-Qpid-03-128b>-n TQBL-Qpid-03-128b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-03-128b>
+ <TQBL-Qpid-03-256b>-n TQBL-Qpid-03-256b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-03-256b>
+ <TQBL-Qpid-03-512b>-n TQBL-Qpid-03-512b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-03-512b>
+ <TQBL-Qpid-03-1K>-n TQBL-Qpid-03-1K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=1024 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-03-1K>
+ <TQBL-Qpid-03-5K>-n TQBL-Qpid-03-5K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=5120 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-03-5K>
+ <TQBL-Qpid-03-10K>-n TQBL-Qpid-03-10K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=10240 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-03-10K>
+ <TQBL-Qpid-03-50K>-n TQBL-Qpid-03-50K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=51200 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-03-50K>
+ <TQBL-Qpid-03-100K>-n TQBL-Qpid-03-100K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=102400 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-03-100K>
+ <TQBL-Qpid-03-500K>-n TQBL-Qpid-03-500K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512000 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-03-500K>
+ <TQBL-Qpid-03-1M>-n TQBL-Qpid-03-1M -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=1048576 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-03-1M>
+
+ <TQBL-Qpid-04-128b>-n TQBL-Qpid-04-128b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-04-128b>
+ <TQBL-Qpid-04-256b>-n TQBL-Qpid-04-256b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-04-256b>
+ <TQBL-Qpid-04-512b>-n TQBL-Qpid-04-512b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-04-512b>
+ <TQBL-Qpid-04-1K>-n TQBL-Qpid-04-1K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=1024 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-04-1K>
+ <TQBL-Qpid-04-5K>-n TQBL-Qpid-04-5K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=5120 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-04-5K>
+ <TQBL-Qpid-04-10K>-n TQBL-Qpid-04-10K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=10240 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-04-10K>
+ <TQBL-Qpid-04-50K>-n TQBL-Qpid-04-50K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=51200 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-04-50K>
+ <TQBL-Qpid-04-100K>-n TQBL-Qpid-04-100K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=102400 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-04-100K>
+ <TQBL-Qpid-04-500K>-n TQBL-Qpid-04-500K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512000 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-04-500K>
+ <TQBL-Qpid-04-1M>-n TQBL-Qpid-04-1M -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=false pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=1048576 destinationCount=1 rate=0 maxPending=2000000 </TQBL-Qpid-04-1M>
+
+ <PQBL-Qpid-03-128b>-n PQBL-Qpid-03-128b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-03-128b>
+ <PQBL-Qpid-03-256b>-n PQBL-Qpid-03-256b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-03-256b>
+ <PQBL-Qpid-03-512b>-n PQBL-Qpid-03-512b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-03-512b>
+ <PQBL-Qpid-03-1K>-n PQBL-Qpid-03-1K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=1024 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-03-1K>
+ <PQBL-Qpid-03-5K>-n PQBL-Qpid-03-5K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=5120 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-03-5K>
+ <PQBL-Qpid-03-10K>-n PQBL-Qpid-03-10K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=10240 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-03-10K>
+ <PQBL-Qpid-03-50K>-n PQBL-Qpid-03-50K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=51200 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-03-50K>
+ <PQBL-Qpid-03-100K>-n PQBL-Qpid-03-100K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=102400 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-03-100K>
+ <PQBL-Qpid-03-500K>-n PQBL-Qpid-03-500K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512000 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-03-500K>
+ <PQBL-Qpid-03-1M>-n PQBL-Qpid-03-1M -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=true consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=1048576 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-03-1M>
+
+ <PQBL-Qpid-04-128b>-n PQBL-Qpid-04-128b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-04-128b>
+ <PQBL-Qpid-04-256b>-n PQBL-Qpid-04-256b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-04-256b>
+ <PQBL-Qpid-04-512b>-n PQBL-Qpid-04-512b -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-04-512b>
+ <PQBL-Qpid-04-1K>-n PQBL-Qpid-04-1K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=1024 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-04-1K>
+ <PQBL-Qpid-04-5K>-n PQBL-Qpid-04-5K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=5120 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-04-5K>
+ <PQBL-Qpid-04-10K>-n PQBL-Qpid-04-10K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=10240 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-04-10K>
+ <PQBL-Qpid-04-50K>-n PQBL-Qpid-04-50K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=51200 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-04-50K>
+ <PQBL-Qpid-04-100K>-n PQBL-Qpid-04-100K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=102400 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-04-100K>
+ <PQBL-Qpid-04-500K>-n PQBL-Qpid-04-500K -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=512000 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-04-500K>
+ <PQBL-Qpid-04-1M>-n PQBL-Qpid-04-1M -d1M -s[100] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testPingLatency org.apache.qpid.ping.PingLatencyTestPerf persistent=true pubsub=false uniqueDests=true numConsumers=1 transacted=false consTransacted=false consAckMode=1 commitBatchSize=1 batchSize=100 messageSize=1048576 destinationCount=1 rate=0 maxPending=2000000 </PQBL-Qpid-04-1M>
<!-- Failover Tests. -->
<FT-Qpid-01>-n FT-Qpid-01 -s[2500] -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf messageSize=256 batchSize=10000 transacted=true broker="tcp://127.0.0.1:5001;tcp://127.0.0.1:5002" failBeforeSend=true -o $QPID_WORK/results</FT-Qpid-01>
diff --git a/java/perftests/src/main/java/org/apache/qpid/oldtopic/Config.java b/java/perftests/src/main/java/org/apache/qpid/oldtopic/Config.java
new file mode 100644
index 0000000000..5b6169ed2d
--- /dev/null
+++ b/java/perftests/src/main/java/org/apache/qpid/oldtopic/Config.java
@@ -0,0 +1,243 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.oldtopic;
+
+import org.apache.qpid.client.AMQSession;
+import org.apache.qpid.config.ConnectorConfig;
+import org.apache.qpid.config.ConnectionFactoryInitialiser;
+import org.apache.qpid.config.Connector;
+import org.apache.qpid.config.AbstractConfig;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+
+class Config extends AbstractConfig implements ConnectorConfig
+{
+
+ private String host = "localhost";
+ private int port = 5672;
+ private String factory = null;
+
+ private int payload = 256;
+ private int messages = 1000;
+ private int clients = 1;
+ private int batch = 1;
+ private long delay = 1;
+ private int warmup;
+ private int ackMode= AMQSession.NO_ACKNOWLEDGE;
+ private String clientId;
+ private String subscriptionId;
+ private boolean persistent;
+
+ public Config()
+ {
+ }
+
+ int getAckMode()
+ {
+ return ackMode;
+ }
+
+ void setPayload(int payload)
+ {
+ this.payload = payload;
+ }
+
+ int getPayload()
+ {
+ return payload;
+ }
+
+ void setClients(int clients)
+ {
+ this.clients = clients;
+ }
+
+ int getClients()
+ {
+ return clients;
+ }
+
+ void setMessages(int messages)
+ {
+ this.messages = messages;
+ }
+
+ int getMessages()
+ {
+ return messages;
+ }
+
+ public String getHost()
+ {
+ return host;
+ }
+
+ public void setHost(String host)
+ {
+ this.host = host;
+ }
+
+ public int getPort()
+ {
+ return port;
+ }
+
+ public String getFactory()
+ {
+ return factory;
+ }
+
+ public void setPort(int port)
+ {
+ this.port = port;
+ }
+
+ int getBatch()
+ {
+ return batch;
+ }
+
+ void setBatch(int batch)
+ {
+ this.batch = batch;
+ }
+
+ int getWarmup()
+ {
+ return warmup;
+ }
+
+ void setWarmup(int warmup)
+ {
+ this.warmup = warmup;
+ }
+
+ public long getDelay()
+ {
+ return delay;
+ }
+
+ public void setDelay(long delay)
+ {
+ this.delay = delay;
+ }
+
+ String getClientId()
+ {
+ return clientId;
+ }
+
+ String getSubscriptionId()
+ {
+ return subscriptionId;
+ }
+
+ boolean usePersistentMessages()
+ {
+ return persistent;
+ }
+
+ public void setOption(String key, String value)
+ {
+ if("-host".equalsIgnoreCase(key))
+ {
+ setHost(value);
+ }
+ else if("-port".equalsIgnoreCase(key))
+ {
+ try
+ {
+ setPort(Integer.parseInt(value));
+ }
+ catch(NumberFormatException e)
+ {
+ throw new RuntimeException("Bad port number: " + value);
+ }
+ }
+ else if("-payload".equalsIgnoreCase(key))
+ {
+ setPayload(parseInt("Bad payload size", value));
+ }
+ else if("-messages".equalsIgnoreCase(key))
+ {
+ setMessages(parseInt("Bad message count", value));
+ }
+ else if("-clients".equalsIgnoreCase(key))
+ {
+ setClients(parseInt("Bad client count", value));
+ }
+ else if("-batch".equalsIgnoreCase(key))
+ {
+ setBatch(parseInt("Bad batch count", value));
+ }
+ else if("-delay".equalsIgnoreCase(key))
+ {
+ setDelay(parseLong("Bad batch delay", value));
+ }
+ else if("-warmup".equalsIgnoreCase(key))
+ {
+ setWarmup(parseInt("Bad warmup count", value));
+ }
+ else if("-ack".equalsIgnoreCase(key))
+ {
+ ackMode = parseInt("Bad ack mode", value);
+ }
+ else if("-factory".equalsIgnoreCase(key))
+ {
+ factory = value;
+ }
+ else if("-clientId".equalsIgnoreCase(key))
+ {
+ clientId = value;
+ }
+ else if("-subscriptionId".equalsIgnoreCase(key))
+ {
+ subscriptionId = value;
+ }
+ else if("-persistent".equalsIgnoreCase(key))
+ {
+ persistent = "true".equalsIgnoreCase(value);
+ }
+ else
+ {
+ System.out.println("Ignoring unrecognised option: " + key);
+ }
+ }
+
+ static String getAckModeDescription(int ackMode)
+ {
+ switch(ackMode)
+ {
+ case AMQSession.NO_ACKNOWLEDGE: return "NO_ACKNOWLEDGE";
+ case AMQSession.AUTO_ACKNOWLEDGE: return "AUTO_ACKNOWLEDGE";
+ case AMQSession.CLIENT_ACKNOWLEDGE: return "CLIENT_ACKNOWLEDGE";
+ case AMQSession.DUPS_OK_ACKNOWLEDGE: return "DUPS_OK_ACKNOWELDGE";
+ case AMQSession.PRE_ACKNOWLEDGE: return "PRE_ACKNOWLEDGE";
+ }
+ return "AckMode=" + ackMode;
+ }
+
+ public Connection createConnection() throws Exception
+ {
+ return new Connector().createConnection(this);
+ }
+}
diff --git a/java/perftests/src/main/java/org/apache/qpid/oldtopic/Listener.java b/java/perftests/src/main/java/org/apache/qpid/oldtopic/Listener.java
new file mode 100644
index 0000000000..4732782d4c
--- /dev/null
+++ b/java/perftests/src/main/java/org/apache/qpid/oldtopic/Listener.java
@@ -0,0 +1,141 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.oldtopic;
+import org.apache.log4j.*;
+import javax.jms.Connection;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+
+public class Listener implements MessageListener
+{
+ private final Connection _connection;
+ private final MessageProducer _controller;
+ private final javax.jms.Session _session;
+ private final MessageFactory _factory;
+ private boolean init;
+ private int count;
+ private long start;
+
+ Listener(Connection connection, int ackMode) throws Exception
+ {
+ this(connection, ackMode, null);
+ }
+
+ Listener(Connection connection, int ackMode, String name) throws Exception
+ {
+ _connection = connection;
+ _session = connection.createSession(false, ackMode);
+ _factory = new MessageFactory(_session);
+
+ //register for events
+ if(name == null)
+ {
+ _factory.createTopicConsumer().setMessageListener(this);
+ }
+ else
+ {
+ _factory.createDurableTopicConsumer(name).setMessageListener(this);
+ }
+
+ _connection.start();
+
+ _controller = _factory.createControlPublisher();
+ System.out.println("Waiting for messages " +
+ Config.getAckModeDescription(ackMode)
+ + (name == null ? "" : " (subscribed with name " + name + " and client id " + connection.getClientID() + ")")
+ + "...");
+
+ }
+
+ private void shutdown()
+ {
+ try
+ {
+ _session.close();
+ _connection.stop();
+ _connection.close();
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace(System.out);
+ }
+ }
+
+ private void report()
+ {
+ try
+ {
+ String msg = getReport();
+ _controller.send(_factory.createReportResponseMessage(msg));
+ System.out.println("Sent report: " + msg);
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace(System.out);
+ }
+ }
+
+ private String getReport()
+ {
+ long time = (System.currentTimeMillis() - start);
+ return "Received " + count + " in " + time + "ms";
+ }
+
+ public void onMessage(Message message)
+ {
+ if(!init)
+ {
+ start = System.currentTimeMillis();
+ count = 0;
+ init = true;
+ }
+
+ if(_factory.isShutdown(message))
+ {
+ shutdown();
+ }
+ else if(_factory.isReport(message))
+ {
+ //send a report:
+ report();
+ init = false;
+ }
+ else if (++count % 100 == 0)
+ {
+ System.out.println("Received " + count + " messages.");
+ }
+ }
+
+ public static void main(String[] argv) throws Exception
+ {
+ Config config = new Config();
+ config.setOptions(argv);
+
+ Connection con = config.createConnection();
+ if(config.getClientId() != null)
+ {
+ con.setClientID(config.getClientId());
+ }
+ new Listener(con, config.getAckMode(), config.getSubscriptionId());
+ }
+}
diff --git a/java/perftests/src/main/java/org/apache/qpid/oldtopic/MessageFactory.java b/java/perftests/src/main/java/org/apache/qpid/oldtopic/MessageFactory.java
new file mode 100644
index 0000000000..b2fbeb7e35
--- /dev/null
+++ b/java/perftests/src/main/java/org/apache/qpid/oldtopic/MessageFactory.java
@@ -0,0 +1,153 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.oldtopic;
+
+import org.apache.qpid.client.AMQSession;
+import org.apache.qpid.client.AMQTopic;
+
+import javax.jms.*;
+
+/**
+ */
+class MessageFactory
+{
+ private static final char[] DATA = "abcdefghijklmnopqrstuvwxyz".toCharArray();
+
+ private final Session _session;
+ private final Topic _topic;
+ private final Topic _control;
+ private final byte[] _payload;
+
+
+ MessageFactory(Session session) throws JMSException
+ {
+ this(session, 256);
+ }
+
+ MessageFactory(Session session, int size) throws JMSException
+ {
+ _session = session;
+/* if(session instanceof AMQSession)
+ {
+ _topic = new AMQTopic("topictest.messages");
+ _control = new AMQTopic("topictest.control");
+ }
+ else*/
+ {
+ _topic = session.createTopic("topictest.messages");
+ _control = session.createTopic("topictest.control");
+ }
+ _payload = new byte[size];
+
+ for(int i = 0; i < size; i++)
+ {
+ _payload[i] = (byte) DATA[i % DATA.length];
+ }
+ }
+
+ Topic getTopic()
+ {
+ return _topic;
+ }
+
+ Message createEventMessage() throws JMSException
+ {
+ BytesMessage msg = _session.createBytesMessage();
+ msg.writeBytes(_payload);
+ return msg;
+ }
+
+ Message createShutdownMessage() throws JMSException
+ {
+ return _session.createTextMessage("SHUTDOWN");
+ }
+
+ Message createReportRequestMessage() throws JMSException
+ {
+ return _session.createTextMessage("REPORT");
+ }
+
+ Message createReportResponseMessage(String msg) throws JMSException
+ {
+ return _session.createTextMessage(msg);
+ }
+
+ boolean isShutdown(Message m)
+ {
+ return checkText(m, "SHUTDOWN");
+ }
+
+ boolean isReport(Message m)
+ {
+ return checkText(m, "REPORT");
+ }
+
+ Object getReport(Message m)
+ {
+ try
+ {
+ return ((TextMessage) m).getText();
+ }
+ catch (JMSException e)
+ {
+ e.printStackTrace(System.out);
+ return e.toString();
+ }
+ }
+
+ MessageConsumer createTopicConsumer() throws Exception
+ {
+ return _session.createConsumer(_topic);
+ }
+
+ MessageConsumer createDurableTopicConsumer(String name) throws Exception
+ {
+ return _session.createDurableSubscriber(_topic, name);
+ }
+
+ MessageConsumer createControlConsumer() throws Exception
+ {
+ return _session.createConsumer(_control);
+ }
+
+ MessageProducer createTopicPublisher() throws Exception
+ {
+ return _session.createProducer(_topic);
+ }
+
+ MessageProducer createControlPublisher() throws Exception
+ {
+ return _session.createProducer(_control);
+ }
+
+ private static boolean checkText(Message m, String s)
+ {
+ try
+ {
+ return m instanceof TextMessage && ((TextMessage) m).getText().equals(s);
+ }
+ catch (JMSException e)
+ {
+ e.printStackTrace(System.out);
+ return false;
+ }
+ }
+}
diff --git a/java/perftests/src/main/java/org/apache/qpid/oldtopic/Publisher.java b/java/perftests/src/main/java/org/apache/qpid/oldtopic/Publisher.java
new file mode 100644
index 0000000000..f811704323
--- /dev/null
+++ b/java/perftests/src/main/java/org/apache/qpid/oldtopic/Publisher.java
@@ -0,0 +1,175 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.oldtopic;
+
+import javax.jms.*;
+
+public class Publisher implements MessageListener
+{
+ private final Object _lock = new Object();
+ private final Connection _connection;
+ private final Session _session;
+ private final MessageFactory _factory;
+ private final MessageProducer _publisher;
+ private int _count;
+
+ Publisher(Connection connection, int size, int ackMode, boolean persistent) throws Exception
+ {
+ _connection = connection;
+ _session = _connection.createSession(false, ackMode);
+ _factory = new MessageFactory(_session, size);
+ _publisher = _factory.createTopicPublisher();
+ _publisher.setDeliveryMode(persistent ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT);
+ System.out.println("Publishing " + (persistent ? "persistent" : "non-persistent") + " messages of " + size + " bytes, " + Config.getAckModeDescription(ackMode) + ".");
+ }
+
+ private void test(Config config) throws Exception
+ {
+ test(config.getBatch(), config.getDelay(), config.getMessages(), config.getClients(), config.getWarmup());
+ }
+
+ private void test(int batches, long delay, int msgCount, int consumerCount, int warmup) throws Exception
+ {
+ _factory.createControlConsumer().setMessageListener(this);
+ _connection.start();
+
+ if(warmup > 0)
+ {
+ System.out.println("Runing warmup (" + warmup + " msgs)");
+ long time = batch(warmup, consumerCount);
+ System.out.println("Warmup completed in " + time + "ms");
+ }
+
+ long[] times = new long[batches];
+ for(int i = 0; i < batches; i++)
+ {
+ if(i > 0) Thread.sleep(delay*1000);
+ times[i] = batch(msgCount, consumerCount);
+ System.out.println("Batch " + (i+1) + " of " + batches + " completed in " + times[i] + " ms.");
+ }
+
+ long min = min(times);
+ long max = max(times);
+ System.out.println("min: " + min + ", max: " + max + " avg: " + avg(times, min, max));
+
+ //request shutdown
+ _publisher.send(_factory.createShutdownMessage());
+
+ _connection.stop();
+ _connection.close();
+ }
+
+ private long batch(int msgCount, int consumerCount) throws Exception
+ {
+ _count = consumerCount;
+ long start = System.currentTimeMillis();
+ publish(msgCount);
+ waitForCompletion(consumerCount);
+ return System.currentTimeMillis() - start;
+ }
+
+ private void publish(int count) throws Exception
+ {
+
+ //send events
+ for (int i = 0; i < count; i++)
+ {
+ _publisher.send(_factory.createEventMessage());
+ if ((i + 1) % 100 == 0)
+ {
+ System.out.println("Sent " + (i + 1) + " messages");
+ }
+ }
+
+ //request report
+ _publisher.send(_factory.createReportRequestMessage());
+ }
+
+ private void waitForCompletion(int consumers) throws Exception
+ {
+ System.out.println("Waiting for completion...");
+ synchronized (_lock)
+ {
+ while (_count > 0)
+ {
+ _lock.wait();
+ }
+ }
+ }
+
+
+ public void onMessage(Message message)
+ {
+ System.out.println("Received report " + _factory.getReport(message) + " " + --_count + " remaining");
+ if (_count == 0)
+ {
+ synchronized (_lock)
+ {
+ _lock.notify();
+ }
+ }
+ }
+
+ static long min(long[] times)
+ {
+ long min = times.length > 0 ? times[0] : 0;
+ for(int i = 0; i < times.length; i++)
+ {
+ min = Math.min(min, times[i]);
+ }
+ return min;
+ }
+
+ static long max(long[] times)
+ {
+ long max = times.length > 0 ? times[0] : 0;
+ for(int i = 0; i < times.length; i++)
+ {
+ max = Math.max(max, times[i]);
+ }
+ return max;
+ }
+
+ static long avg(long[] times, long min, long max)
+ {
+ long sum = 0;
+ for(int i = 0; i < times.length; i++)
+ {
+ sum += times[i];
+ }
+ sum -= min;
+ sum -= max;
+
+ return (sum / (times.length - 2));
+ }
+
+ public static void main(String[] argv) throws Exception
+ {
+ Config config = new Config();
+ config.setOptions(argv);
+
+ Connection con = config.createConnection();
+ int size = config.getPayload();
+ int ackMode = config.getAckMode();
+ boolean persistent = config.usePersistentMessages();
+ new Publisher(con, size, ackMode, persistent).test(config);
+ }
+}
diff --git a/java/perftests/src/main/java/org/apache/qpid/ping/PingAsyncTestPerf.java b/java/perftests/src/main/java/org/apache/qpid/ping/PingAsyncTestPerf.java
index edbc311bd5..06081e6ebf 100644
--- a/java/perftests/src/main/java/org/apache/qpid/ping/PingAsyncTestPerf.java
+++ b/java/perftests/src/main/java/org/apache/qpid/ping/PingAsyncTestPerf.java
@@ -29,11 +29,9 @@ import org.apache.qpid.requestreply.PingPongProducer;
import uk.co.thebadgerset.junit.extensions.TimingController;
import uk.co.thebadgerset.junit.extensions.TimingControllerAware;
-import uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
import javax.jms.JMSException;
import javax.jms.Message;
-import javax.jms.ObjectMessage;
import java.util.Collections;
import java.util.HashMap;
diff --git a/java/perftests/src/main/java/org/apache/qpid/ping/PingClient.java b/java/perftests/src/main/java/org/apache/qpid/ping/PingClient.java
index ac12436951..b9632eee4c 100644
--- a/java/perftests/src/main/java/org/apache/qpid/ping/PingClient.java
+++ b/java/perftests/src/main/java/org/apache/qpid/ping/PingClient.java
@@ -93,13 +93,13 @@ public class PingClient extends PingPongProducer
if (_isUnique)
{
- log.debug("1 consumer per destination.");
+ log.debug(_noOfConsumers + " consumer per destination.");
return _noOfConsumers;
}
else
{
- log.debug(_pingClientCount + " consumers per destination.");
+ log.debug((_pingClientCount * _noOfConsumers) + " consumers per destination.");
return _pingClientCount * _noOfConsumers;
}
diff --git a/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java b/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java
index bd34fd8f20..99ed9f8367 100644
--- a/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java
+++ b/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java
@@ -46,6 +46,7 @@ import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
@@ -119,21 +120,11 @@ import java.util.concurrent.atomic.AtomicLong;
* <tr><td> Provide command line invocation to loop the ping cycle on a configurable broker url.
* </table>
*
- * @todo Make the message listener a static for all replies to be sent to? It won't be any more of a bottle neck than having
- * one per PingPongProducer, as will synchronize on message correlation id, allowing threads to process messages
- * concurrently for different ids. Needs to be static so that when using a chained message listener and shared
- * destinations between multiple PPPs, it gets notified about all replies, not just those that happen to be picked up
- * by the PPP that it is atteched to.
- *
* @todo Use read/write lock in the onmessage, not for reading writing but to make use of a shared and exlcusive lock pair.
* Obtain read lock on all messages, before decrementing the message count. At the end of the on message method add a
* block that obtains the write lock for the very last message, releases any waiting producer. Means that the last
* message waits until all other messages have been handled before releasing producers but allows messages to be
* processed concurrently, unlike the current synchronized block.
- *
- * @todo Get rid of pauses between batches, it will impact the timing statistics, and generate meanigless timings.
- * Instead make mina use a bounded blocking buffer, or other form of back pressure, to stop data being written
- * faster than it can be sent.
*/
public class PingPongProducer implements Runnable /*, MessageListener*/, ExceptionListener
{
@@ -164,7 +155,10 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
/** Holds the transactional mode to use for the test. */
public static final boolean TRANSACTED_DEFAULT = false;
+ /** Holds the name of the property to get the test consumer transacted mode from. */
public static final String CONSUMER_TRANSACTED_PROPNAME = "consTransacted";
+
+ /** Holds the consumer transactional mode default setting. */
public static final boolean CONSUMER_TRANSACTED_DEFAULT = false;
/** Holds the name of the property to get the test broker url from. */
@@ -275,7 +269,10 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
/** Defines the default value for the unique destinations property. */
public static final boolean UNIQUE_DESTS_DEFAULT = true;
+ /** Holds the name of the property to get the durable destinations flag from. */
public static final String DURABLE_DESTS_PROPNAME = "durableDests";
+
+ /** Defines the default value of the durable destinations flag. */
public static final boolean DURABLE_DESTS_DEFAULT = false;
/** Holds the name of the proeprty to get the message acknowledgement mode from. */
@@ -284,10 +281,16 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
/** Defines the default message acknowledgement mode. */
public static final int ACK_MODE_DEFAULT = Session.AUTO_ACKNOWLEDGE;
+ /** Holds the name of the property to get the consumers message acknowledgement mode from. */
public static final String CONSUMER_ACK_MODE_PROPNAME = "consAckMode";
+
+ /** Defines the default consumers message acknowledgement mode. */
public static final int CONSUMER_ACK_MODE_DEFAULT = Session.AUTO_ACKNOWLEDGE;
+ /** Holds the name of the property to get the maximum pending message size setting from. */
public static final String MAX_PENDING_PROPNAME = "maxPending";
+
+ /** Defines the default value for the maximum pending message size setting. 0 means no limit. */
public static final int MAX_PENDING_DEFAULT = 0;
/** Defines the default prefetch size to use when consuming messages. */
@@ -336,21 +339,37 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
defaults.setPropertyIfNull(MAX_PENDING_PROPNAME, MAX_PENDING_DEFAULT);
}
+ /** Holds the broker url. */
protected String _brokerDetails;
+
+ /** Holds the username to access the broker with. */
protected String _username;
+
+ /** Holds the password to access the broker with. */
protected String _password;
+
+ /** Holds the virtual host on the broker to run the tests through. */
protected String _virtualpath;
+
+ /** Holds the root name from which to generate test destination names. */
protected String _destinationName;
+
+ /** Holds the message selector to filter the pings with. */
protected String _selector;
+
+ /** Holds the producers transactional mode flag. */
protected boolean _transacted;
+
+ /** Holds the consumers transactional mode flag. */
protected boolean _consTransacted;
/** Determines whether this producer sends persistent messages. */
protected boolean _persistent;
- /** Holds the acknowledgement mode used for sending and receiving messages. */
+ /** Holds the acknowledgement mode used for the producers. */
protected int _ackMode;
+ /** Holds the acknowledgement mode setting for the consumers. */
protected int _consAckMode;
/** Determines what size of messages this producer sends. */
@@ -401,18 +420,15 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
*/
protected int _maxPendingSize;
- /**
- * Holds a monitor which is used to synchronize sender and receivers threads, where the sender has elected
- * to wait until the number of unreceived message is reduced before continuing to send.
- */
- protected Object _sendPauseMonitor = new Object();
-
- /** Keeps a count of the number of message currently sent but not received. */
- protected AtomicInteger _unreceived = new AtomicInteger(0);
-
/** A source for providing sequential unique correlation ids. These will be unique within the same JVM. */
private static AtomicLong _correlationIdGenerator = new AtomicLong(0L);
+ /** A source for providing sequential unqiue ids for instances of this class to be identifed with. */
+ private static AtomicInteger _instanceIdGenerator = new AtomicInteger(0);
+
+ /** Holds this instances unique id. */
+ private int instanceId;
+
/**
* Holds a map from message ids to latches on which threads wait for replies. This map is shared accross multiple
* ping producers on the same JVM.
@@ -423,7 +439,7 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
/** A convenient formatter to use when time stamping output. */
protected static final DateFormat timestampFormatter = new SimpleDateFormat("hh:mm:ss:SS");
- /** Holds the connection to the broker. */
+ /** Holds the connection for the message producer. */
protected Connection _connection;
/** Holds the consumer connections. */
@@ -470,23 +486,37 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
/** The prompt to display when asking the user to kill the broker for failover testing. */
private static final String KILL_BROKER_PROMPT = "Kill broker now, then press Return.";
+
+ /** Holds the name for this test client to be identified to the broker with. */
private String _clientID;
/** Keeps count of the total messages sent purely for debugging purposes. */
private static AtomicInteger numSent = new AtomicInteger();
/**
+ * Holds a monitor which is used to synchronize sender and receivers threads, where the sender has elected
+ * to wait until the number of unreceived message is reduced before continuing to send. This monitor is a
+ * fair SynchronousQueue becuase that provides fair scheduling, to ensure that all producer threads get an
+ * equal chance to produce messages.
+ */
+ static final SynchronousQueue _sendPauseMonitor = new SynchronousQueue(true);
+
+ /** Keeps a count of the number of message currently sent but not received. */
+ static AtomicInteger _unreceived = new AtomicInteger(0);
+
+ /**
* Creates a ping producer with the specified parameters, of which there are many. See the class level comments
* for details. This constructor creates a connection to the broker and creates producer and consumer sessions on
* it, to send and recieve its pings and replies on.
*
- * @param overrides Properties containing any desired overrides to the defaults.
+ * @param overrides Properties containing any desired overrides to the defaults.
*
* @throws Exception Any exceptions are allowed to fall through.
*/
public PingPongProducer(Properties overrides) throws Exception
{
// log.debug("public PingPongProducer(Properties overrides = " + overrides + "): called");
+ instanceId = _instanceIdGenerator.getAndIncrement();
// Create a set of parsed properties from the defaults overriden by the passed in values.
ParsedProperties properties = new ParsedProperties(defaults);
@@ -516,8 +546,8 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
_isPubSub = properties.getPropertyAsBoolean(PUBSUB_PROPNAME);
_isUnique = properties.getPropertyAsBoolean(UNIQUE_DESTS_PROPNAME);
_isDurable = properties.getPropertyAsBoolean(DURABLE_DESTS_PROPNAME);
- _ackMode = properties.getPropertyAsInteger(ACK_MODE_PROPNAME);
- _consAckMode = properties.getPropertyAsInteger(CONSUMER_ACK_MODE_PROPNAME);
+ _ackMode = _transacted ? 0 : properties.getPropertyAsInteger(ACK_MODE_PROPNAME);
+ _consAckMode = _consTransacted ? 0 : properties.getPropertyAsInteger(CONSUMER_ACK_MODE_PROPNAME);
_maxPendingSize = properties.getPropertyAsInteger(MAX_PENDING_PROPNAME);
// Check that one or more destinations were specified.
@@ -706,13 +736,15 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
* Creates consumers for the specified number of destinations. The destinations themselves are also created by this
* method.
*
- * @param noOfDestinations The number of destinations to create consumers for.
- * @param selector The message selector to filter the consumers with.
- * @param rootName The root of the name, or actual name if only one is being created.
- * @param unique <tt>true</tt> to make the destinations unique to this pinger, <tt>false</tt> to share the
- * numbering with all pingers on the same JVM.
+ * @param noOfDestinations The number of destinations to create consumers for.
+ * @param selector The message selector to filter the consumers with.
+ * @param rootName The root of the name, or actual name if only one is being created.
+ * @param unique <tt>true</tt> to make the destinations unique to this pinger, <tt>false</tt> to share the
+ * numbering with all pingers on the same JVM.
+ * @param durable If the destinations are durable topics.
*
* @throws JMSException Any JMSExceptions are allowed to fall through.
+ * @throws AMQException Any AMQExceptions are allowed to fall through.
*/
public void createPingDestinations(int noOfDestinations, String selector, String rootName, boolean unique,
boolean durable) throws JMSException, AMQException
@@ -792,9 +824,9 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
/*log.debug("public void createReplyConsumers(Collection<Destination> destinations = " + destinations
+ ", String selector = " + selector + "): called");*/
- // log.debug("There are " + destinations.size() + " destinations.");
- // log.debug("Creating " + _noOfConsumers + " consumers on each destination.");
- // log.debug("Total number of consumers is: " + (destinations.size() * _noOfConsumers));
+ log.debug("There are " + destinations.size() + " destinations.");
+ log.debug("Creating " + _noOfConsumers + " consumers on each destination.");
+ log.debug("Total number of consumers is: " + (destinations.size() * _noOfConsumers));
for (Destination destination : destinations)
{
@@ -817,7 +849,7 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
}
});
- // log.debug("Set consumer " + i + " to listen to replies sent to destination: " + destination);
+ log.debug("Set consumer " + i + " to listen to replies sent to destination: " + destination);
}
}
}
@@ -827,7 +859,8 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
* correlating reply may be waiting on. This is only done if the reply has a correlation id that is expected in the
* replies map.
*
- * @param message The received message.
+ * @param message The received message.
+ * @param consumerNo The consumer number within this test pinger instance.
*/
public void onMessageWithConsumerNo(Message message, int consumerNo)
{
@@ -838,13 +871,13 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
long timestamp = getTimestamp(message);
long pingTime = now - timestamp;
- // NDC.push("cons" + consumerNo);
+ // NDC.push("id" + instanceId + "/cons" + consumerNo);
// Extract the messages correlation id.
String correlationID = message.getJMSCorrelationID();
// log.debug("correlationID = " + correlationID);
- int num = message.getIntProperty("MSG_NUM");
+ // int num = message.getIntProperty("MSG_NUM");
// log.info("Message " + num + " received.");
boolean isRedelivered = message.getJMSRedelivered();
@@ -864,11 +897,32 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
// log.debug("Reply was expected, decrementing the latch for the id, " + correlationID);
+ // Release waiting senders if there are some and using maxPending limit.
+ if ((_maxPendingSize > 0))
+ {
+ // Decrement the count of sent but not yet received messages.
+ int unreceived = _unreceived.decrementAndGet();
+ int unreceivedSize =
+ (unreceived * ((_messageSize == 0) ? 1 : _messageSize))
+ / (_isPubSub ? getConsumersPerDestination() : 1);
+
+ // log.debug("unreceived = " + unreceived);
+ // log.debug("unreceivedSize = " + unreceivedSize);
+
+ // synchronized (_sendPauseMonitor)
+ // {
+ if (unreceivedSize < _maxPendingSize)
+ {
+ _sendPauseMonitor.poll();
+ }
+ // }
+ }
+
// Decrement the countdown latch. Before this point, it is possible that two threads might enter this
// method simultanesouly with the same correlation id. Decrementing the latch in a synchronized block
// ensures that each thread will get a unique value for the remaining messages.
- long trueCount = -1;
- long remainingCount = -1;
+ long trueCount;
+ long remainingCount;
synchronized (trafficLight)
{
@@ -877,51 +931,33 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
trueCount = trafficLight.getCount();
remainingCount = trueCount - 1;
- // Decrement the count of sent but not yet received messages.
- int unreceived = _unreceived.decrementAndGet();
- int unreceivedSize = (unreceived * ((_messageSize == 0) ? 1 : _messageSize));
-
- // Release a waiting sender if there is one.
- synchronized (_sendPauseMonitor)
- {
- if ((_maxPendingSize > 0) && (unreceivedSize < _maxPendingSize))
- // && (_sendPauseBarrier.getNumberWaiting() == 1))
- {
- // log.debug("unreceived size estimate under limit = " + unreceivedSize);
-
- // Wait on the send pause barrier for the limit to be re-established.
- /*try
- {*/
- // _sendPauseBarrier.await();
- _sendPauseMonitor.notify();
- /*}
- catch (InterruptedException e)
- {
- throw new RuntimeException(e);
- }
- catch (BrokenBarrierException e)
- {
- throw new RuntimeException(e);
- }*/
- }
- }
-
// NDC.push("/rem" + remainingCount);
// log.debug("remainingCount = " + remainingCount);
// log.debug("trueCount = " + trueCount);
- // Commit on transaction batch size boundaries. At this point in time the waiting producer remains
- // blocked, even on the last message.
+ // Commit on transaction batch size boundaries. At this point in time the waiting producer
+ // remains blocked, even on the last message.
// Commit count is divided by noOfConsumers in p2p mode, so that each consumer only commits on
// each batch boundary. For pub/sub each consumer gets every message so no division is done.
+ // When running in client ack mode, an ack is done instead of a commit, on the commit batch
+ // size boundaries.
long commitCount = _isPubSub ? remainingCount : (remainingCount / _noOfConsumers);
// log.debug("commitCount = " + commitCount);
if ((commitCount % _txBatchSize) == 0)
{
- // log.debug("Trying commit for consumer " + consumerNo + ".");
- commitTx(_consumerSession[consumerNo]);
+ if (_consAckMode == 2)
+ {
+ // log.debug("Doing client ack for consumer " + consumerNo + ".");
+ message.acknowledge();
+ }
+ else
+ {
+ // log.debug("Trying commit for consumer " + consumerNo + ".");
+ commitTx(_consumerSession[consumerNo]);
+ // log.info("Tx committed on consumer " + consumerNo);
+ }
}
// Forward the message and remaining count to any interested chained message listener.
@@ -947,18 +983,6 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
{
log.warn("Got redelivered message, ignoring.");
}
-
- // Print out ping times for every message in verbose mode only.
- /*if (_verbose)
- {
- Long timestamp = message.getLongProperty(MESSAGE_TIMESTAMP_PROPNAME);
-
- if (timestamp != null)
- {
- long diff = System.nanoTime() - timestamp;
- //log.trace("Time for round trip (nanos): " + diff);
- }
- }*/
}
catch (JMSException e)
{
@@ -1020,9 +1044,9 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
// Send the specifed number of messages.
pingNoWaitForReply(message, numPings, messageCorrelationId);
- boolean timedOut = false;
- boolean allMessagesReceived = false;
- int numReplies = 0;
+ boolean timedOut;
+ boolean allMessagesReceived;
+ int numReplies;
do
{
@@ -1100,9 +1124,6 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
// Send all of the ping messages.
for (int i = 0; i < numPings; i++)
{
- // Reset the committed flag to indicate that there may be uncommitted messages.
- committed = false;
-
// Re-timestamp the message.
// message.setLongProperty(MESSAGE_TIMESTAMP_PROPNAME, System.nanoTime());
@@ -1138,99 +1159,161 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
*/
protected boolean sendMessage(int i, Message message) throws JMSException
{
- // log.debug("protected boolean sendMessage(int i = " + i + ", Message message): called");
- // log.debug("_txBatchSize = " + _txBatchSize);
+ try
+ {
+ NDC.push("id" + instanceId + "/prod");
- // Round robin the destinations as the messages are sent.
- Destination destination = _pingDestinations.get(i % _pingDestinations.size());
+ // log.debug("protected boolean sendMessage(int i = " + i + ", Message message): called");
+ // log.debug("_txBatchSize = " + _txBatchSize);
- // Prompt the user to kill the broker when doing failover testing.
- if (_failBeforeSend)
- {
- if (_failOnce)
- {
- _failBeforeSend = false;
- }
+ // Round robin the destinations as the messages are sent.
+ Destination destination = _pingDestinations.get(i % _pingDestinations.size());
- // log.trace("Failing Before Send");
- waitForUser(KILL_BROKER_PROMPT);
- }
+ // Prompt the user to kill the broker when doing failover testing.
+ _failBeforeSend = waitForUserToPromptOnFailure(_failBeforeSend);
- // If necessary, wait until the max pending message size comes within its limit.
- synchronized (_sendPauseMonitor)
- {
- while ((_maxPendingSize > 0))
- {
- // Get the size estimate of sent but not yet received messages.
- int unreceived = _unreceived.get();
- int unreceivedSize = (unreceived * ((_messageSize == 0) ? 1 : _messageSize));
+ // Get the test setup for the correlation id.
+ String correlationID = message.getJMSCorrelationID();
+ PerCorrelationId perCorrelationId = perCorrelationIds.get(correlationID);
- if (unreceivedSize > _maxPendingSize)
+ // If necessary, wait until the max pending message size comes within its limit.
+ if (_maxPendingSize > 0)
+ {
+ synchronized (_sendPauseMonitor)
{
- // log.debug("unreceived size estimate over limit = " + unreceivedSize);
+ // Used to keep track of the number of times that send has to wait.
+ int numWaits = 0;
- // Wait on the send pause barrier for the limit to be re-established.
- try
- {
- // _sendPauseBarrier.await();
- _sendPauseMonitor.wait(1000);
- }
- catch (InterruptedException e)
+ // The maximum number of waits before the test gives up and fails. This has been chosen to correspond with
+ // the test timeout.
+ int waitLimit = (int) (TIMEOUT_DEFAULT / 10000);
+
+ while (true)
{
- // Restore the interrupted status
- Thread.currentThread().interrupt();
- throw new RuntimeException(e);
+ // Get the size estimate of sent but not yet received messages.
+ int unreceived = _unreceived.get();
+ int unreceivedSize =
+ (unreceived * ((_messageSize == 0) ? 1 : _messageSize))
+ / (_isPubSub ? getConsumersPerDestination() : 1);
+
+ // log.debug("unreceived = " + unreceived);
+ // log.debug("unreceivedSize = " + unreceivedSize);
+ // log.debug("_maxPendingSize = " + _maxPendingSize);
+
+ if (unreceivedSize > _maxPendingSize)
+ {
+ // log.debug("unreceived size estimate over limit = " + unreceivedSize);
+
+ // Fail the test if the send has had to wait more than the maximum allowed number of times.
+ if (numWaits > waitLimit)
+ {
+ String errorMessage =
+ "Send has had to wait for the unreceivedSize (" + unreceivedSize
+ + ") to come below the maxPendingSize (" + _maxPendingSize + ") more that " + waitLimit
+ + " times.";
+ log.warn(errorMessage);
+ throw new RuntimeException(errorMessage);
+ }
+
+ // Wait on the send pause barrier for the limit to be re-established.
+ try
+ {
+ long start = System.nanoTime();
+ // _sendPauseMonitor.wait(10000);
+ _sendPauseMonitor.offer(new Object(), 10000, TimeUnit.MILLISECONDS);
+ long end = System.nanoTime();
+
+ // Count the wait only if it was for > 99% of the requested wait time.
+ if (((float) (end - start) / (float) (10000 * 1000000L)) > 0.99)
+ {
+ numWaits++;
+ }
+ }
+ catch (InterruptedException e)
+ {
+ // Restore the interrupted status
+ Thread.currentThread().interrupt();
+ throw new RuntimeException(e);
+ }
+ }
+ else
+ {
+ break;
+ }
}
- /*catch (BrokenBarrierException e)
- {
- throw new RuntimeException(e);
- }*/
- }
- else
- {
- break;
}
}
- }
- // Send the message either to its round robin destination, or its default destination.
- if (destination == null)
- {
- int num = numSent.incrementAndGet();
- message.setIntProperty("MSG_NUM", num);
- setTimestamp(message);
- _producer.send(message);
- // log.info("Message " + num + " sent.");
- }
- else
- {
- int num = numSent.incrementAndGet();
- message.setIntProperty("MSG_NUM", num);
+ // Send the message either to its round robin destination, or its default destination.
+ // int num = numSent.incrementAndGet();
+ // message.setIntProperty("MSG_NUM", num);
setTimestamp(message);
- _producer.send(destination, message);
- // log.info("Message " + num + " sent.");
- }
- // Increase the unreceived size, this may actually happen aftern the message is recevied.
- _unreceived.getAndIncrement();
+ if (destination == null)
+ {
+ _producer.send(message);
+ }
+ else
+ {
+ _producer.send(destination, message);
+ }
- // Apply message rate throttling if a rate limit has been set up.
- if (_rateLimiter != null)
+ // Increase the unreceived size, this may actually happen after the message is received.
+ // The unreceived size is incremented by the number of consumers that will get a copy of the message,
+ // in pub/sub mode.
+ if (_maxPendingSize > 0)
+ {
+ int newUnreceivedCount = _unreceived.addAndGet(_isPubSub ? getConsumersPerDestination() : 1);
+ // log.debug("newUnreceivedCount = " + newUnreceivedCount);
+ }
+
+ // Apply message rate throttling if a rate limit has been set up.
+ if (_rateLimiter != null)
+ {
+ _rateLimiter.throttle();
+ }
+
+ // Call commit every time the commit batch size is reached.
+ boolean committed = false;
+
+ // Commit on every transaction batch size boundary. Here i + 1 is the count of actual messages sent.
+ if (((i + 1) % _txBatchSize) == 0)
+ {
+ // log.debug("Trying commit on producer session.");
+ committed = commitTx(_producerSession);
+ }
+
+ return committed;
+ }
+ finally
{
- _rateLimiter.throttle();
+ NDC.clear();
}
+ }
- // Call commit every time the commit batch size is reached.
- boolean committed = false;
-
- // Commit on every transaction batch size boundary. Here i + 1 is the count of actual messages sent.
- if (((i + 1) % _txBatchSize) == 0)
+ /**
+ * If the specified fail flag is set, this method waits for the user to cause a failure and then indicate to the
+ * test that the failure has occurred, before the method returns.
+ *
+ * @param failFlag The fail flag to test.
+ *
+ * @return The new value for the fail flag. If the {@link #_failOnce} flag is set, then each fail flag is only
+ * used once, then reset.
+ */
+ private boolean waitForUserToPromptOnFailure(boolean failFlag)
+ {
+ if (failFlag)
{
- // log.debug("Trying commit on producer session.");
- committed = commitTx(_producerSession);
+ if (_failOnce)
+ {
+ failFlag = false;
+ }
+
+ // log.debug("Failing Before Send");
+ waitForUser(KILL_BROKER_PROMPT);
}
- return committed;
+ return failFlag;
}
/**
@@ -1291,15 +1374,16 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
*/
public Message getTestMessage(Destination replyQueue, int messageSize, boolean persistent) throws JMSException
{
- ObjectMessage msg = TestMessageFactory.newObjectMessage(_producerSession, replyQueue, messageSize, persistent);
-
- // Timestamp the message in nanoseconds.
-
- // setTimestamp(msg);
-
- return msg;
+ return TestMessageFactory.newObjectMessage(_producerSession, replyQueue, messageSize, persistent);
}
+ /**
+ * Sets the current time in nanoseconds as the timestamp on the message.
+ *
+ * @param msg The message to timestamp.
+ *
+ * @throws JMSException Any JMSExceptions are allowed to fall through.
+ */
protected void setTimestamp(Message msg) throws JMSException
{
if (((AMQSession) _producerSession).isStrictAMQP())
@@ -1312,9 +1396,17 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
}
}
+ /**
+ * Extracts the nanosecond timestamp from a message.
+ *
+ * @param msg The message to extract the time stamp from.
+ *
+ * @return The timestamp in nanos.
+ *
+ * @throws JMSException Any JMSExceptions are allowed to fall through.
+ */
protected long getTimestamp(Message msg) throws JMSException
{
-
if (((AMQSession) _producerSession).isStrictAMQP())
{
Long value = ((AMQMessage) msg).getTimestampProperty(new AMQShortString(MESSAGE_TIMESTAMP_PROPNAME));
@@ -1328,7 +1420,7 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
}
/**
- * Stops the ping loop by clearing the publish flag. The current loop will complete before it notices that this flag
+ * Stops the ping loop by clearing the publish flag. The current loop will complete when it notices that this flag
* has been cleared.
*/
public void stop()
@@ -1336,13 +1428,22 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
_publish = false;
}
+ /**
+ * Starts the producer and consumer connections.
+ *
+ * @throws JMSException Any JMSExceptions are allowed to fall through.
+ */
public void start() throws JMSException
{
+ // log.debug("public void start(): called");
+
_connection.start();
+ // log.debug("Producer started.");
for (int i = 0; i < _noOfConsumers; i++)
{
_consumerConnection[i].start();
+ // log.debug("Consumer " + i + " started.");
}
}
@@ -1386,7 +1487,7 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
}
/**
- * Closes the pingers connection.
+ * Closes all of the producer and consumer connections.
*
* @throws JMSException All JMSException are allowed to fall through.
*/
@@ -1398,16 +1499,18 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
{
if (_connection != null)
{
+ // log.debug("Before close producer connection.");
_connection.close();
- // log.debug("Close connection.");
+ // log.debug("Closed producer connection.");
}
for (int i = 0; i < _noOfConsumers; i++)
{
if (_consumerConnection[i] != null)
{
+ // log.debug("Before close consumer connection " + i + ".");
_consumerConnection[i].close();
- // log.debug("Closed consumer connection.");
+ // log.debug("Closed consumer connection " + i + ".");
}
}
}
@@ -1451,18 +1554,7 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
boolean committed = false;
- // log.trace("Batch time reached");
- if (_failAfterSend)
- {
- // log.trace("Batch size reached");
- if (_failOnce)
- {
- _failAfterSend = false;
- }
-
- // log.trace("Failing After Send");
- waitForUser(KILL_BROKER_PROMPT);
- }
+ _failAfterSend = waitForUserToPromptOnFailure(_failAfterSend);
if (session.getTransacted())
{
@@ -1470,32 +1562,14 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti
try
{
- if (_failBeforeCommit)
- {
- if (_failOnce)
- {
- _failBeforeCommit = false;
- }
-
- // log.trace("Failing Before Commit");
- waitForUser(KILL_BROKER_PROMPT);
- }
+ _failBeforeCommit = waitForUserToPromptOnFailure(_failBeforeCommit);
long start = System.nanoTime();
session.commit();
committed = true;
// log.debug("Time taken to commit :" + ((System.nanoTime() - start) / 1000000f) + " ms");
- if (_failAfterCommit)
- {
- if (_failOnce)
- {
- _failAfterCommit = false;
- }
-
- // log.trace("Failing After Commit");
- waitForUser(KILL_BROKER_PROMPT);
- }
+ _failAfterCommit = waitForUserToPromptOnFailure(_failAfterCommit);
// log.debug("Session Commited.");
}
diff --git a/java/pom.xml b/java/pom.xml
index 547b5d12ec..ef44e01df6 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -399,7 +399,7 @@ under the License.
<plugin>
<groupId>uk.co.thebadgerset</groupId>
<artifactId>junit-toolkit-maven-plugin</artifactId>
- <version>0.5</version>
+ <version>0.6-SNAPSHOT</version>
</plugin>
@@ -506,7 +506,7 @@ under the License.
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
- <version>1.0</version>
+ <version>1.4.3</version>
</dependency>
<dependency>
<groupId>org.apache.mina</groupId>
diff --git a/java/systests/src/main/java/org/apache/mina/transport/vmpipe/support/VmPipeIdleStatusChecker.java b/java/systests/src/main/java/org/apache/mina/transport/vmpipe/support/VmPipeIdleStatusChecker.java
new file mode 100644
index 0000000000..5323ad28bf
--- /dev/null
+++ b/java/systests/src/main/java/org/apache/mina/transport/vmpipe/support/VmPipeIdleStatusChecker.java
@@ -0,0 +1,125 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.mina.transport.vmpipe.support;
+
+import org.apache.mina.common.IdleStatus;
+
+import java.util.HashMap;
+import java.util.IdentityHashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * This file is a patch to override MINA, because of the IdentityHashMap bug. Workaround to be supplied in MINA 1.0.7.
+ * This patched file will be removed once upgraded onto a newer MINA.
+ *
+ * Dectects idle sessions and fires <tt>sessionIdle</tt> events to them.
+ *
+ * @author The Apache Directory Project (mina-dev@directory.apache.org)
+ */
+public class VmPipeIdleStatusChecker
+{
+ private static final VmPipeIdleStatusChecker INSTANCE = new VmPipeIdleStatusChecker();
+
+ public static VmPipeIdleStatusChecker getInstance()
+ {
+ return INSTANCE;
+ }
+
+ private final Map sessions = new HashMap(); // will use as a set
+
+ private final Worker worker = new Worker();
+
+ private VmPipeIdleStatusChecker()
+ {
+ worker.start();
+ }
+
+ public void addSession(VmPipeSessionImpl session)
+ {
+ synchronized (sessions)
+ {
+ sessions.put(session, session);
+ }
+ }
+
+ private class Worker extends Thread
+ {
+ private Worker()
+ {
+ super("VmPipeIdleStatusChecker");
+ setDaemon(true);
+ }
+
+ public void run()
+ {
+ for (;;)
+ {
+ try
+ {
+ Thread.sleep(1000);
+ }
+ catch (InterruptedException e)
+ { }
+
+ long currentTime = System.currentTimeMillis();
+
+ synchronized (sessions)
+ {
+ Iterator it = sessions.keySet().iterator();
+ while (it.hasNext())
+ {
+ VmPipeSessionImpl session = (VmPipeSessionImpl) it.next();
+ if (!session.isConnected())
+ {
+ it.remove();
+ }
+ else
+ {
+ notifyIdleSession(session, currentTime);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void notifyIdleSession(VmPipeSessionImpl session, long currentTime)
+ {
+ notifyIdleSession0(session, currentTime, session.getIdleTimeInMillis(IdleStatus.BOTH_IDLE), IdleStatus.BOTH_IDLE,
+ Math.max(session.getLastIoTime(), session.getLastIdleTime(IdleStatus.BOTH_IDLE)));
+ notifyIdleSession0(session, currentTime, session.getIdleTimeInMillis(IdleStatus.READER_IDLE), IdleStatus.READER_IDLE,
+ Math.max(session.getLastReadTime(), session.getLastIdleTime(IdleStatus.READER_IDLE)));
+ notifyIdleSession0(session, currentTime, session.getIdleTimeInMillis(IdleStatus.WRITER_IDLE), IdleStatus.WRITER_IDLE,
+ Math.max(session.getLastWriteTime(), session.getLastIdleTime(IdleStatus.WRITER_IDLE)));
+ }
+
+ private void notifyIdleSession0(VmPipeSessionImpl session, long currentTime, long idleTime, IdleStatus status,
+ long lastIoTime)
+ {
+ if ((idleTime > 0) && (lastIoTime != 0) && ((currentTime - lastIoTime) >= idleTime))
+ {
+ session.increaseIdleCount(status);
+ session.getFilterChain().fireSessionIdle(session, status);
+ }
+ }
+
+}
diff --git a/java/systests/src/main/java/org/apache/qpid/server/failure/DeadlockTest.java b/java/systests/src/main/java/org/apache/qpid/server/failure/DeadlockTest.java
new file mode 100644
index 0000000000..a25af30008
--- /dev/null
+++ b/java/systests/src/main/java/org/apache/qpid/server/failure/DeadlockTest.java
@@ -0,0 +1,211 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.qpid.server.failure;
+
+import junit.framework.TestCase;
+import org.apache.qpid.client.AMQConnectionFactory;
+import org.apache.qpid.client.transport.TransportConnection;
+import org.apache.qpid.client.vmbroker.AMQVMBrokerCreationException;
+import org.apache.qpid.url.URLSyntaxException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.jms.Connection;
+import javax.jms.DeliveryMode;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.Topic;
+import java.util.Random;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * DeadlockTestCase:
+ * From a client requirement.
+ *
+ * The JMS Spec specifies that a Session has a single thread of control. And as such setting message listeners from a
+ * second thread is not allowed.
+ * Section 4.4.6 of the Spec states:
+ <quote>Another consequence is that a connection must be in stopped mode to set up a
+session with more than one message listener. The reason is that when a
+connection is actively delivering messages, once the first message listener for a
+session has been registered, the session is now controlled by the thread of
+control that delivers messages to it. At this point a client thread of control
+cannot be used to further configure the session.</quote>
+ *
+ * It, however, does not specified what we should do in the case. it only states:
+ <quote>Once a connection has been started, all its sessions with a registered message
+listener are dedicated to the thread of control that delivers messages to them. It
+is erroneous for client code to use such a session from another thread of
+control. The only exception to this is the use of the session or connection close
+method.</quote>
+ *
+ * While it may be erroneous the causing a Deadlock is not a very satisfactory solution. This test ensures that we do
+ * no do this. There is no technical reason we cannot currently allow the setting of a messageListener on a new consumer.
+ * The only caveate is due to QPID-577 there is likely to be temporary message 'loss'. As they are stuck on the internal
+ * _synchronousQueue pending a synchronous receive.
+ *
+ */
+public class DeadlockTest extends TestCase
+{
+ private static final Logger _logger = LoggerFactory.getLogger(DeadlockTest.class);
+
+
+ public static final String QPID_BROKER_CONNECTION_PROPERTY = "QPIDBROKER";
+
+ private String topic1 = "TEST.DeadLock1.TMP";
+ private String topic2 = "TEST.DeadLock2.TMP";
+
+ private Session sess;
+
+ private Semaphore s = new Semaphore(0);
+ private final String LOCAL = "tcp://localhost:5670";
+ private final String VM = "vm://:1";
+
+ private String BROKER = VM;
+
+ String connectionString = System.getProperty(QPID_BROKER_CONNECTION_PROPERTY,
+ "amqp://guest:guest@/test?brokerlist='" + BROKER + "'");
+
+
+ public void setUp() throws AMQVMBrokerCreationException
+ {
+ if (BROKER.equals("vm://:1"))
+ {
+ TransportConnection.createVMBroker(1);
+ }
+ }
+
+ public void tearDown() throws AMQVMBrokerCreationException
+ {
+ if (BROKER.equals("vm://:1"))
+ {
+ TransportConnection.killAllVMBrokers();
+ }
+ }
+
+ public class EmptyMessageListener implements javax.jms.MessageListener
+ {
+ public void onMessage(Message message)
+ {
+ // do nothing
+ }
+ }
+
+ public void setSessionListener(String topic, javax.jms.MessageListener listener)
+ {
+ try
+ {
+ Topic jmsTopic = sess.createTopic(topic);
+ MessageConsumer subscriber = sess.createConsumer(jmsTopic);
+ subscriber.setMessageListener(listener);
+ }
+ catch (JMSException e)
+ {
+ e.printStackTrace();
+ fail("Caught JMSException");
+ }
+ }
+
+ public class TestMessageListener implements javax.jms.MessageListener
+ {
+ public Random r = new Random();
+
+ public void onMessage(Message message)
+ {
+ if (r.nextBoolean())
+ {
+ setSessionListener(topic2, new EmptyMessageListener());
+ }
+ }
+
+ }
+
+ public void testDeadlock() throws InterruptedException, URLSyntaxException, JMSException
+ {
+ // in order to trigger the deadlock we need to
+ // set a message listener from one thread
+ // whilst receiving a message on another thread and on that thread also setting (the same?) message listener
+ AMQConnectionFactory acf = new AMQConnectionFactory(connectionString);
+ Connection conn = acf.createConnection();
+ conn.start();
+ sess = conn.createSession(false, org.apache.qpid.jms.Session.NO_ACKNOWLEDGE);
+ setSessionListener(topic1, new TestMessageListener());
+
+
+ Thread th = new Thread()
+ {
+ public void run()
+ {
+ try
+ {
+ Topic jmsTopic = sess.createTopic(topic1);
+ MessageProducer producer = sess.createProducer(jmsTopic);
+ producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
+ Random r = new Random();
+ long end = System.currentTimeMillis() + 2000;
+ while (end - System.currentTimeMillis() > 0)
+ {
+ if (r.nextBoolean())
+ {
+ _logger.info("***************** send message");
+ Message jmsMessage = sess.createTextMessage("");
+ producer.send(jmsMessage);
+ }
+ else
+ {
+ _logger.info("***************** set session listener");
+ setSessionListener(topic2, new EmptyMessageListener());
+ }
+ Thread.yield();
+ }
+ _logger.info("done sends");
+ s.release();
+ }
+ catch (JMSException e)
+ {
+ e.printStackTrace();
+ fail("Caught JMSException");
+ }
+ }
+ };
+ th.setDaemon(true);
+ th.setName("testDeadlock");
+ th.start();
+
+ boolean success = s.tryAcquire(1, 4, TimeUnit.SECONDS);
+
+ // if we failed, closing the connection will just hang the test case.
+ if (success)
+ {
+ conn.close();
+ }
+
+ if (!success)
+ {
+ fail("Deadlock ocurred");
+ }
+ }
+}
diff --git a/java/systests/src/main/java/org/apache/qpid/server/queue/AckTest.java b/java/systests/src/main/java/org/apache/qpid/server/queue/AckTest.java
index ae2209c629..29952a6d9b 100644
--- a/java/systests/src/main/java/org/apache/qpid/server/queue/AckTest.java
+++ b/java/systests/src/main/java/org/apache/qpid/server/queue/AckTest.java
@@ -187,9 +187,27 @@ public class AckTest extends TestCase
UnacknowledgedMessageMap map = _channel.getUnacknowledgedMessageMap();
assertTrue(map.size() == 0);
assertTrue(_messageStore.getMessageMetaDataMap().size() == 0);
+ assertTrue(_messageStore.getContentBodyMap().size() == 0);
}
/**
+ * Tests that in no-ack mode no messages are retained
+ */
+ public void testPersistentNoAckMode() throws AMQException
+ {
+ // false arg means no acks expected
+ _subscription = new SubscriptionImpl(5, _protocolSession, DEFAULT_CONSUMER_TAG, false);
+ final int msgCount = 10;
+ publishMessages(msgCount, true);
+
+ UnacknowledgedMessageMap map = _channel.getUnacknowledgedMessageMap();
+ assertTrue(map.size() == 0);
+ assertTrue(_messageStore.getMessageMetaDataMap().size() == 0);
+ assertTrue(_messageStore.getContentBodyMap().size() == 0);
+ }
+
+
+ /**
* Tests that a single acknowledgement is handled correctly (i.e multiple flag not
* set case)
*/
diff --git a/java/systests/src/main/java/org/apache/qpid/server/queue/MessageReturnTest.java b/java/systests/src/main/java/org/apache/qpid/server/queue/MessageReturnTest.java
new file mode 100644
index 0000000000..45bf73bd9d
--- /dev/null
+++ b/java/systests/src/main/java/org/apache/qpid/server/queue/MessageReturnTest.java
@@ -0,0 +1,315 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.qpid.server.queue;
+
+import junit.framework.TestCase;
+import org.apache.log4j.Logger;
+import org.apache.qpid.client.AMQNoRouteException;
+import org.apache.qpid.client.transport.TransportConnection;
+import org.apache.qpid.jndi.PropertiesFileInitialContextFactory;
+import org.apache.qpid.server.registry.ApplicationRegistry;
+import org.apache.qpid.server.registry.IApplicationRegistry;
+import org.apache.qpid.server.store.MemoryMessageStore;
+import org.apache.qpid.server.store.TestableMemoryMessageStore;
+import org.apache.qpid.server.virtualhost.VirtualHost;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.ExceptionListener;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.naming.spi.InitialContextFactory;
+import java.util.Hashtable;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ * Test Case to ensure that messages are correctly returned.
+ * This includes checking:
+ * - The message is returned.
+ * - The broker doesn't leak memory.
+ * - The broker's state is correct after test.
+ */
+public class MessageReturnTest extends TestCase implements ExceptionListener
+{
+ private static final Logger _logger = Logger.getLogger(MessageReturnTest.class);
+
+
+ protected final String BROKER = "vm://:1";
+ protected final String VHOST = "test";
+ protected final String QUEUE = "MessageReturnTest";
+ protected final String BADQUEUE = "MessageReturnTest-bad-to-force-returns";
+
+
+ private Context _context;
+
+ private Connection _producerConnection;
+
+ private MessageProducer _producer;
+ private Session _clientSession, _producerSession;
+ private static final int MSG_COUNT = 50;
+
+ private Message[] _messages = new Message[MSG_COUNT];
+
+ private CountDownLatch _returns = new CountDownLatch(1);
+ private int _receivedCount = 0;
+ private int _initialContentBodyMapSize;
+ private int _initilaMessageMetaDataMapSize;
+
+ protected void setUp() throws Exception
+ {
+ if (BROKER.startsWith("vm://"))
+ {
+ TransportConnection.createVMBroker(1);
+ }
+ InitialContextFactory factory = new PropertiesFileInitialContextFactory();
+
+ Hashtable<String, String> env = new Hashtable<String, String>();
+
+ env.put("connectionfactory.connection", "amqp://guest:guest@TTL_TEST_ID/" + VHOST + "?brokerlist='" + BROKER + "'");
+ env.put("queue.queue", QUEUE);
+ env.put("queue.badQueue", QUEUE);
+
+ _context = factory.getInitialContext(env);
+
+ getBrokerInitialState();
+ }
+
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+
+ if (_producerConnection != null)
+ {
+ _producerConnection.close();
+ }
+
+ if (BROKER.startsWith("vm://"))
+ {
+ TransportConnection.killAllVMBrokers();
+ }
+ }
+
+ public void test() throws Exception
+ {
+ init();
+ //Send Msgs
+ for (int msg = 0; msg < MSG_COUNT; msg++)
+ {
+ _producer.send(nextMessage(msg));
+ }
+
+ try
+ {
+ // Wait for all returns to arrive any longer than 5secs and something has gone wrong.
+ _returns.await(5, TimeUnit.SECONDS);
+ }
+ catch (InterruptedException e)
+ {
+
+ }
+
+ //Close the connection.. .giving the broker time to clean up its state.
+ _producerConnection.close();
+
+ //Verify we get all the messages.
+ verifyAllMessagesRecevied();
+ //Verify Broker state
+ verifyBrokerState();
+ }
+
+ private void init() throws NamingException, JMSException
+ {
+ _receivedCount = 0;
+ _messages = new Message[MSG_COUNT];
+ _returns = new CountDownLatch(1);
+
+ //Create Producer
+ _producerConnection = ((ConnectionFactory) _context.lookup("connection")).createConnection();
+
+ _producerConnection.setExceptionListener(this);
+
+ _producerConnection.start();
+
+ _producerSession = _producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ _producer = _producerSession.createProducer((Queue) _context.lookup("badQueue"));
+ }
+
+ // todo: collect to a general testing class - duplicated in AMQQueueMBeanTest
+ private void getBrokerInitialState()
+ {
+ IApplicationRegistry registry = ApplicationRegistry.getInstance();
+
+ VirtualHost testVhost = registry.getVirtualHostRegistry().getVirtualHost(VHOST);
+
+ assertNotNull("Unable to get test Vhost", testVhost.getMessageStore());
+
+ TestableMemoryMessageStore store = new TestableMemoryMessageStore((MemoryMessageStore) testVhost.getMessageStore());
+
+ _initialContentBodyMapSize = store.getContentBodyMap() == null ? 0 : store.getContentBodyMap().size();
+ _initilaMessageMetaDataMapSize = store.getMessageMetaDataMap() == null ? 0 : store.getMessageMetaDataMap().size();
+
+ if (_initialContentBodyMapSize != 0)
+ {
+ _logger.warn("Store is dirty: ContentBodyMap has Size:" + _initialContentBodyMapSize);
+ System.out.println("Store is dirty: ContentBodyMap has Size:" + _initialContentBodyMapSize);
+ }
+
+ if (_initilaMessageMetaDataMapSize != 0)
+ {
+ _logger.warn("Store is dirty: MessageMetaDataMap has Size:" + _initilaMessageMetaDataMapSize);
+ System.out.println("Store is dirty: MessageMetaDataMap has Size:" + _initilaMessageMetaDataMapSize);
+ }
+
+ }
+
+ private void verifyBrokerState()
+ {
+ IApplicationRegistry registry = ApplicationRegistry.getInstance();
+
+ VirtualHost testVhost = registry.getVirtualHostRegistry().getVirtualHost(VHOST);
+
+ assertNotNull("Unable to get test Vhost", testVhost.getMessageStore());
+
+ TestableMemoryMessageStore store = new TestableMemoryMessageStore((MemoryMessageStore) testVhost.getMessageStore());
+
+
+ assertNotNull("ContentBodyMap should not be null", store.getContentBodyMap());
+
+ // If the CBM has content it may be due to the broker not yet purging.
+ // Closing the producer connection before testing should give the store time to clean up.
+ // Perform a quick sleep just in case
+ while (store.getContentBodyMap().size() > _initialContentBodyMapSize)
+ {
+ try
+ {
+ Thread.sleep(500);
+ }
+ catch (InterruptedException e)
+ {
+ }
+ }
+ assertTrue("Expected the store content size not reached at test start it was :" + _initialContentBodyMapSize + " Now it is :" + store.getContentBodyMap().size(), _initialContentBodyMapSize >= store.getContentBodyMap().size());
+ assertNotNull("MessageMetaDataMap should not be null", store.getMessageMetaDataMap());
+ assertTrue("Expected the store MessageMetaData size not reached at test start it was :" + _initilaMessageMetaDataMapSize + " Now it is :" + store.getMessageMetaDataMap().size(), _initialContentBodyMapSize >= store.getMessageMetaDataMap().size());
+ }
+
+ private void verifyAllMessagesRecevied()
+ {
+
+ boolean[] msgIdRecevied = new boolean[MSG_COUNT];
+
+ int msgId = 0;
+
+ //Check received messages
+ for (Message msg : _messages)
+ {
+ assertNotNull("Missing message:" + msgId, msg);
+ assertFalse("Already received msg id " + msgId, msgIdRecevied[msgId]);
+ msgIdRecevied[msgId] = true;
+ msgId++;
+ }
+
+ //Check all recevied
+ for (msgId = 0; msgId < MSG_COUNT; msgId++)
+ {
+ assertTrue("Message " + msgId + " not received.", msgIdRecevied[msgId]);
+ }
+ }
+
+ /**
+ * We can't verify messageOrder here as the return threads are not synchronized so we have no way of
+ * guarranting the order.
+ */
+ private void verifyMessageOrder()
+ {
+ int msgId = 0;
+ for (Message msg : _messages)
+ {
+ assertNotNull("Missing message:" + msgId, msg);
+ try
+ {
+ assertEquals("Message not received in correct order", msgId, msg.getIntProperty("ID"));
+ }
+ catch (JMSException e)
+ {
+ fail("Unable to get messageID for msg:" + msg);
+ }
+
+ msgId++;
+ }
+ }
+
+ /**
+ * Get the next message putting the given count into the intProperties as ID.
+ *
+ * @param msgNo the message count to store as ID.
+ * @return
+ * @throws JMSException
+ */
+
+ private Message nextMessage(int msgNo) throws JMSException
+ {
+ Message send = _producerSession.createTextMessage("MessageReturnTest");
+ send.setIntProperty("ID", msgNo);
+ return send;
+ }
+
+
+ public void onException(JMSException jmsException)
+ {
+ // NOTE:
+ // This method MUST be thread-safe. Mulitple threads can call this at once.
+ synchronized (this)
+ {
+ if (jmsException.getLinkedException() instanceof AMQNoRouteException)
+ {
+ AMQNoRouteException amq = (AMQNoRouteException) jmsException.getLinkedException();
+
+ Message msg = (Message) amq.getUndeliveredMessage();
+
+ if (_receivedCount < MSG_COUNT)
+ {
+ assertNotNull("Reeceived Null message:" + _receivedCount, msg);
+ _messages[_receivedCount] = msg;
+ _receivedCount++;
+ }
+ else
+ {
+ fail("Received to many messages expected :" + MSG_COUNT + " received: " + _receivedCount + 1);
+ }
+
+ if (_receivedCount == MSG_COUNT)
+ {
+ _returns.countDown();
+ }
+ }
+ }
+ }
+}
diff --git a/java/systests/src/main/java/org/apache/qpid/server/queue/QueueDepthWithSelectorTest.java b/java/systests/src/main/java/org/apache/qpid/server/queue/QueueDepthWithSelectorTest.java
new file mode 100644
index 0000000000..7bbfdb5543
--- /dev/null
+++ b/java/systests/src/main/java/org/apache/qpid/server/queue/QueueDepthWithSelectorTest.java
@@ -0,0 +1,214 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.qpid.server.queue;
+
+import java.util.Hashtable;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.naming.spi.InitialContextFactory;
+
+import junit.framework.TestCase;
+
+import org.apache.log4j.Logger;
+import org.apache.qpid.client.transport.TransportConnection;
+import org.apache.qpid.framing.AMQShortString;
+import org.apache.qpid.jndi.PropertiesFileInitialContextFactory;
+import org.apache.qpid.server.registry.ApplicationRegistry;
+import org.apache.qpid.server.registry.IApplicationRegistry;
+import org.apache.qpid.server.virtualhost.VirtualHost;
+
+
+/**
+ * Test Case to ensure that messages are correctly returned.
+ * This includes checking:
+ * - The message is returned.
+ * - The broker doesn't leak memory.
+ * - The broker's state is correct after test.
+ */
+public class QueueDepthWithSelectorTest extends TestCase
+{
+ private static final Logger _logger = Logger.getLogger(QueueDepthWithSelectorTest.class);
+
+ protected final String BROKER = "vm://:1";
+ protected final String VHOST = "test";
+ protected final String QUEUE = this.getClass().getName();
+
+ private Context _context;
+
+ private Connection _clientConnection, _producerConnection;
+ private Session _clientSession, _producerSession;
+ private MessageProducer _producer;
+ private MessageConsumer _consumer;
+
+ private static final int MSG_COUNT = 50;
+
+ private Message[] _messages = new Message[MSG_COUNT];
+
+ protected void setUp() throws Exception
+ {
+ if (BROKER.startsWith("vm://"))
+ {
+ TransportConnection.createVMBroker(1);
+ }
+ InitialContextFactory factory = new PropertiesFileInitialContextFactory();
+
+ Hashtable<String, String> env = new Hashtable<String, String>();
+
+ env.put("connectionfactory.connection", "amqp://guest:guest@TTL_TEST_ID/" + VHOST + "?brokerlist='" + BROKER + "'");
+ env.put("queue.queue", QUEUE);
+
+ _context = factory.getInitialContext(env);
+
+ }
+
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+
+ if (_producerConnection != null)
+ {
+ _producerConnection.close();
+ }
+
+ if (_clientConnection != null)
+ {
+ _clientConnection.close();
+ }
+
+ if (BROKER.startsWith("vm://"))
+ {
+ TransportConnection.killAllVMBrokers();
+ }
+ }
+
+ public void test() throws Exception
+ {
+ init();
+ //Send messages
+ _logger.info("Starting to send messages");
+ for (int msg = 0; msg < MSG_COUNT; msg++)
+ {
+ _producer.send(nextMessage(msg));
+ }
+ _logger.info("Closing connection");
+ //Close the connection.. .giving the broker time to clean up its state.
+ _producerConnection.close();
+
+ //Verify we get all the messages.
+ _logger.info("Verifying messages");
+ verifyAllMessagesRecevied();
+
+ //Close the connection.. .giving the broker time to clean up its state.
+ _clientConnection.close();
+
+ //Verify Broker state
+ _logger.info("Verifying broker state");
+ verifyBrokerState();
+ }
+
+ private void init() throws NamingException, JMSException
+ {
+ _messages = new Message[MSG_COUNT];
+
+ //Create Producer
+ _producerConnection = ((ConnectionFactory) _context.lookup("connection")).createConnection();
+ _producerConnection.start();
+ _producerSession = _producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ _producer = _producerSession.createProducer((Queue) _context.lookup("queue"));
+
+ // Create consumer
+ _clientConnection = ((ConnectionFactory) _context.lookup("connection")).createConnection();
+ _clientConnection.start();
+ _clientSession = _clientConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ _consumer = _clientSession.createConsumer((Queue) _context.lookup("queue"), "key = 23");
+ }
+
+ private void verifyBrokerState()
+ {
+ IApplicationRegistry registry = ApplicationRegistry.getInstance();
+
+ VirtualHost testVhost = registry.getVirtualHostRegistry().getVirtualHost(VHOST);
+ assertNotNull("Unable to get test Vhost", testVhost);
+ assertNotNull("Unable to get test queue registry", testVhost.getQueueRegistry());
+ AMQQueue q = testVhost.getQueueRegistry().getQueue(new AMQShortString(QUEUE));
+ assertNotNull("Unable to get test queue", q);
+ assertEquals("Queue count too big", 0, q.getMessageCount());
+ }
+
+ private void verifyAllMessagesRecevied() throws JMSException
+ {
+
+ boolean[] msgIdRecevied = new boolean[MSG_COUNT];
+
+
+ for (int i = 0; i < MSG_COUNT; i++)
+ {
+ _messages[i] = _consumer.receive(1000);
+ assertNotNull("should have received a message but didn't", _messages[i]);
+ }
+
+ //Check received messages
+ int msgId = 0;
+ for (Message msg : _messages)
+ {
+ assertNotNull("Message should not be null", msg);
+ assertEquals("msgId was wrong", msgId, msg.getIntProperty("ID"));
+ assertFalse("Already received msg id " + msgId, msgIdRecevied[msgId]);
+ msgIdRecevied[msgId] = true;
+ msgId++;
+ }
+
+ //Check all received
+ for (msgId = 0; msgId < MSG_COUNT; msgId++)
+ {
+ assertTrue("Message " + msgId + " not received.", msgIdRecevied[msgId]);
+ }
+ }
+
+ /**
+ * Get the next message putting the given count into the intProperties as ID.
+ *
+ * @param msgNo the message count to store as ID.
+ *
+ * @return
+ *
+ * @throws JMSException
+ */
+
+ private Message nextMessage(int msgNo) throws JMSException
+ {
+ Message send = _producerSession.createTextMessage("MessageReturnTest");
+ send.setIntProperty("ID", msgNo);
+ send.setIntProperty("key", 23);
+ return send;
+ }
+
+}
diff --git a/java/systests/src/main/java/org/apache/qpid/server/store/TestableMemoryMessageStore.java b/java/systests/src/main/java/org/apache/qpid/server/store/TestableMemoryMessageStore.java
index 79d428fee8..48d808142c 100644
--- a/java/systests/src/main/java/org/apache/qpid/server/store/TestableMemoryMessageStore.java
+++ b/java/systests/src/main/java/org/apache/qpid/server/store/TestableMemoryMessageStore.java
@@ -33,6 +33,14 @@ import java.util.List;
*/
public class TestableMemoryMessageStore extends MemoryMessageStore
{
+
+ MemoryMessageStore _mms = null;
+
+ public TestableMemoryMessageStore(MemoryMessageStore mms)
+ {
+ _mms = mms;
+ }
+
public TestableMemoryMessageStore()
{
_metaDataMap = new ConcurrentHashMap<Long, MessageMetaData>();
@@ -41,11 +49,25 @@ public class TestableMemoryMessageStore extends MemoryMessageStore
public ConcurrentMap<Long, MessageMetaData> getMessageMetaDataMap()
{
- return _metaDataMap;
+ if (_mms != null)
+ {
+ return _mms._metaDataMap;
+ }
+ else
+ {
+ return _metaDataMap;
+ }
}
public ConcurrentMap<Long, List<ContentChunk>> getContentBodyMap()
{
- return _contentBodyMap;
+ if (_mms != null)
+ {
+ return _mms._contentBodyMap;
+ }
+ else
+ {
+ return _contentBodyMap;
+ }
}
}
diff --git a/java/systests/src/main/java/org/apache/qpid/server/txn/TxnBufferTest.java b/java/systests/src/main/java/org/apache/qpid/server/txn/TxnBufferTest.java
index 1d9e30c24e..025f8d89f6 100644
--- a/java/systests/src/main/java/org/apache/qpid/server/txn/TxnBufferTest.java
+++ b/java/systests/src/main/java/org/apache/qpid/server/txn/TxnBufferTest.java
@@ -27,6 +27,7 @@ import org.apache.qpid.server.store.TestableMemoryMessageStore;
import org.apache.qpid.server.store.StoreContext;
import java.util.LinkedList;
+import java.util.NoSuchElementException;
public class TxnBufferTest extends TestCase
{
@@ -78,7 +79,16 @@ public class TxnBufferTest extends TestCase
buffer.enlist(new FailedPrepare());
buffer.enlist(new MockOp());
- buffer.commit(null);
+ try
+ {
+ buffer.commit(null);
+
+ }
+ catch (NoSuchElementException e)
+ {
+
+ }
+
validateOps();
store.validate();
}
diff --git a/java/systests/src/main/java/org/apache/qpid/server/txn/TxnTest.java b/java/systests/src/main/java/org/apache/qpid/server/txn/TxnTest.java
new file mode 100644
index 0000000000..2957dda869
--- /dev/null
+++ b/java/systests/src/main/java/org/apache/qpid/server/txn/TxnTest.java
@@ -0,0 +1,188 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.qpid.server.txn;
+
+import junit.framework.TestCase;
+import junit.framework.Assert;
+import org.apache.qpid.client.transport.TransportConnection;
+import org.apache.qpid.jndi.PropertiesFileInitialContextFactory;
+import org.apache.log4j.Logger;
+
+import javax.jms.JMSException;
+import javax.jms.Session;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.ConnectionFactory;
+import javax.jms.Connection;
+import javax.jms.Message;
+import javax.jms.TextMessage;
+import javax.jms.MessageListener;
+import javax.naming.spi.InitialContextFactory;
+import javax.naming.Context;
+import java.util.Hashtable;
+import java.util.concurrent.CountDownLatch;
+
+
+/** Test Case Qpid-617 */
+public class TxnTest extends TestCase implements MessageListener
+{
+ private static final Logger _logger = Logger.getLogger(TxnTest.class);
+
+
+ protected final String BROKER = "vm://:1";//"localhost";
+ protected final String VHOST = "/test";
+ protected final String QUEUE = "TxnTestQueue";
+
+
+ Context _context;
+ Queue _queue;
+
+ private Connection _clientConnection, _producerConnection;
+
+ private MessageConsumer _consumer;
+ MessageProducer _producer;
+ Session _clientSession, _producerSession;
+ private CountDownLatch commit = new CountDownLatch(1);
+
+ protected void setUp() throws Exception
+ {
+ if (BROKER.startsWith("vm://"))
+ {
+ TransportConnection.createVMBroker(1);
+ }
+ InitialContextFactory factory = new PropertiesFileInitialContextFactory();
+
+ Hashtable<String, String> env = new Hashtable<String, String>();
+
+ env.put("connectionfactory.connection", "amqp://guest:guest@TTL_TEST_ID" + VHOST + "?brokerlist='" + BROKER + "'");
+ env.put("queue.queue", QUEUE);
+
+ _context = factory.getInitialContext(env);
+
+ _queue = (Queue) _context.lookup("queue");
+
+ //Create Client 1
+ _clientConnection = ((ConnectionFactory) _context.lookup("connection")).createConnection();
+
+ _clientSession = _clientConnection.createSession(true, 0);
+
+ _consumer = _clientSession.createConsumer(_queue);
+
+ //Create Producer
+ _producerConnection = ((ConnectionFactory) _context.lookup("connection")).createConnection();
+
+ _producerConnection.start();
+
+ _producerSession = _producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ _producer = _producerSession.createProducer(_queue);
+ }
+
+ protected void tearDown() throws Exception
+ {
+ if (_clientConnection != null)
+ {
+ _clientConnection.close();
+ }
+
+ if (_producerConnection != null)
+ {
+ _producerConnection.close();
+ }
+
+ super.tearDown();
+
+ if (BROKER.startsWith("vm://"))
+ {
+ TransportConnection.killAllVMBrokers();
+ }
+ }
+
+
+ public void testMessageListener() throws JMSException
+ {
+ _consumer.setMessageListener(this);
+ _clientConnection.start();
+
+ //Set TTL
+ _producer.send(_producerSession.createTextMessage("TxtTestML"));
+
+
+ try
+ {
+ //Wait for message to arrive
+ commit.await();
+ }
+ catch (InterruptedException e)
+ {
+
+ }
+ _consumer.close();
+
+ _consumer = _clientSession.createConsumer(_queue);
+
+ //Receive Message
+ Message received = _consumer.receive(1000);
+ assertNull("More messages received", received);
+
+ _consumer.close();
+ }
+
+ public void onMessage(Message message)
+ {
+
+ try
+ {
+ assertEquals("Incorrect Message Received.", "TxtTestML", ((TextMessage) message).getText());
+
+ _clientSession.commit();
+ }
+ catch (JMSException e)
+ {
+ fail("Failed to commit");
+ }
+
+ commit.countDown();
+ }
+
+
+ public void testReceive() throws JMSException
+ {
+ _clientConnection.start();
+
+ //Set TTL
+ _producer.send(_producerSession.createTextMessage("TxtTestReceive"));
+
+ //Receive Message
+ Message received = _consumer.receive(1000);
+
+ assertEquals("Incorrect Message Received.", "TxtTestReceive", ((TextMessage) received).getText());
+ //Receive Message
+
+ received = _consumer.receive(1000);
+
+ assertNull("More messages received", received);
+
+ _consumer.close();
+ }
+}
diff --git a/java/systests/src/main/java/org/apache/qpid/test/framework/ExceptionMonitor.java b/java/systests/src/main/java/org/apache/qpid/test/framework/ExceptionMonitor.java
index 34274c827c..9f1207202e 100644
--- a/java/systests/src/main/java/org/apache/qpid/test/framework/ExceptionMonitor.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/ExceptionMonitor.java
@@ -52,7 +52,7 @@ public class ExceptionMonitor implements ExceptionListener
*
* @param e The exception to record.
*/
- public void onException(JMSException e)
+ public synchronized void onException(JMSException e)
{
log.debug("public void onException(JMSException e): called", e);
@@ -64,7 +64,7 @@ public class ExceptionMonitor implements ExceptionListener
*
* @return <tt>true</tt> if no exceptions have been received, <tt>false</tt> otherwise.
*/
- public boolean assertNoExceptions()
+ public synchronized boolean assertNoExceptions()
{
return exceptions.isEmpty();
}
@@ -74,7 +74,7 @@ public class ExceptionMonitor implements ExceptionListener
*
* @return <tt>true</tt> if exactly one exception been received, <tt>false</tt> otherwise.
*/
- public boolean assertOneJMSException()
+ public synchronized boolean assertOneJMSException()
{
return exceptions.size() == 1;
}
@@ -85,7 +85,7 @@ public class ExceptionMonitor implements ExceptionListener
* @return <tt>true</tt> if exactly one exception, with a linked cause of the specified type, been received,
* <tt>false</tt> otherwise.
*/
- public boolean assertOneJMSExceptionWithLinkedCause(Class aClass)
+ public synchronized boolean assertOneJMSExceptionWithLinkedCause(Class aClass)
{
if (exceptions.size() == 1)
{
@@ -107,7 +107,7 @@ public class ExceptionMonitor implements ExceptionListener
*
* @return The number of exceptions held by this monitor.
*/
- public int size()
+ public synchronized int size()
{
return exceptions.size();
}
@@ -115,9 +115,9 @@ public class ExceptionMonitor implements ExceptionListener
/**
* Clears the record of received exceptions.
*/
- public void reset()
+ public synchronized void reset()
{
- exceptions = new ArrayList();
+ exceptions = new ArrayList<JMSException>();
}
/**
@@ -126,7 +126,7 @@ public class ExceptionMonitor implements ExceptionListener
*
* @return A string containing a dump of the stack traces of all exceptions.
*/
- public String toString()
+ public synchronized String toString()
{
String result = "ExceptionMonitor: holds " + exceptions.size() + " exceptions.\n\n";
diff --git a/java/systests/src/main/java/org/apache/qpid/test/framework/TestUtils.java b/java/systests/src/main/java/org/apache/qpid/test/framework/TestUtils.java
index 8b3e72ef08..569eac425c 100644
--- a/java/systests/src/main/java/org/apache/qpid/test/framework/TestUtils.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/TestUtils.java
@@ -26,16 +26,13 @@ import static org.apache.qpid.test.framework.MessagingTestConfigProperties.*;
import uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
+import javax.jms.*;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
-import java.util.Properties;
import java.util.Map;
+import java.util.Properties;
/**
* TestUtils provides static helper methods that are usefull for writing tests against QPid.
@@ -51,6 +48,10 @@ public class TestUtils
/** Used for debugging. */
private static Logger log = Logger.getLogger(TestUtils.class);
+ private static byte[] MESSAGE_DATA_BYTES =
+ "Test Message -- Test Message -- Test Message -- Test Message -- Test Message -- Test Message -- Test Message -- "
+ .getBytes();
+
/**
* Establishes a JMS connection using a set of properties and qpids built in JNDI implementation. This is a simple
* convenience method for code that does not anticipate handling connection failures. All exceptions that indicate
@@ -96,9 +97,8 @@ public class TestUtils
Context ctx = new InitialContext(messagingProps);
ConnectionFactory cf = (ConnectionFactory) ctx.lookup(CONNECTION_NAME);
- Connection connection = cf.createConnection();
- return connection;
+ return cf.createConnection();
}
catch (NamingException e)
{
@@ -111,6 +111,39 @@ public class TestUtils
}
/**
+ * Creates a test message of the specified size, on the given JMS session.
+ *
+ * @param session The JMS session.
+ * @param size The size of the message in bytes.
+ *
+ * @return A bytes message, of the specified size, filled with dummy data.
+ *
+ *
+ */
+ public static Message createTestMessageOfSize(Session session, int size) throws JMSException
+ {
+ BytesMessage message = session.createBytesMessage();
+
+ if (size > 0)
+ {
+ int div = MESSAGE_DATA_BYTES.length / size;
+ int mod = MESSAGE_DATA_BYTES.length % size;
+
+ for (int i = 0; i < div; i++)
+ {
+ message.writeBytes(MESSAGE_DATA_BYTES);
+ }
+
+ if (mod != 0)
+ {
+ message.writeBytes(MESSAGE_DATA_BYTES, 0, mod);
+ }
+ }
+
+ return message;
+ }
+
+ /**
* Pauses for the specified length of time. In the event of failing to pause for at least that length of time
* due to interuption of the thread, a RutimeException is raised to indicate the failure. The interupted status
* of the thread is restores in that case. This method should only be used when it is expected that the pause
diff --git a/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/Coordinator.java b/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/Coordinator.java
index 2dd8e82d47..90a44e3b6b 100644
--- a/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/Coordinator.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/Coordinator.java
@@ -32,14 +32,11 @@ import org.apache.qpid.test.framework.MessagingTestConfigProperties;
import org.apache.qpid.test.framework.TestClientDetails;
import org.apache.qpid.test.framework.TestUtils;
import org.apache.qpid.test.framework.clocksynch.UDPClockReference;
-import org.apache.qpid.test.framework.listeners.XMLTestListener;
import org.apache.qpid.util.ConversationFactory;
import org.apache.qpid.util.PrettyPrintingUtils;
-import uk.co.thebadgerset.junit.extensions.TKTestResult;
import uk.co.thebadgerset.junit.extensions.TKTestRunner;
import uk.co.thebadgerset.junit.extensions.WrappedSuiteTestDecorator;
-import uk.co.thebadgerset.junit.extensions.listeners.CSVTestListener;
import uk.co.thebadgerset.junit.extensions.util.CommandLineParser;
import uk.co.thebadgerset.junit.extensions.util.MathUtils;
import uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
@@ -47,7 +44,6 @@ import uk.co.thebadgerset.junit.extensions.util.TestContextProperties;
import javax.jms.*;
-import java.io.*;
import java.net.InetAddress;
import java.util.*;
import java.util.concurrent.LinkedBlockingQueue;
@@ -111,12 +107,6 @@ public class Coordinator extends TKTestRunner
/** Holds the connection that the coordinating messages are sent over. */
protected Connection connection;
- /**
- * Holds the name of the class of the test currently being run. Ideally passed into the {@link #createTestResult}
- * method, but as the signature is already fixed for this, the current value gets pushed here as a member variable.
- */
- protected String currentTestClassName;
-
/** Holds the path of the directory to output test results too, if one is defined. */
protected String reportDir;
@@ -126,12 +116,6 @@ public class Coordinator extends TKTestRunner
/** Flag that indicates that all test clients should be terminated upon completion of the test cases. */
protected boolean terminate;
- /** Flag that indicates the CSV results listener should be used to output results. */
- protected boolean csvResults;
-
- /** Flag that indiciates the XML results listener should be used to output results. */
- protected boolean xmlResults;
-
/**
* Creates an interop test coordinator on the specified broker and virtual host.
*
@@ -155,7 +139,7 @@ public class Coordinator extends TKTestRunner
String reportDir, String runName, boolean verbose, String brokerUrl, String virtualHost, TestEngine engine,
boolean terminate, boolean csv, boolean xml)
{
- super(repetitions, duration, threads, delay, params, testCaseName, reportDir, runName, verbose);
+ super(repetitions, duration, threads, delay, params, testCaseName, reportDir, runName, csv, xml, verbose);
log.debug("public Coordinator(Integer repetitions = " + repetitions + " , Long duration = " + duration
+ ", int[] threads = " + Arrays.toString(threads) + ", int delay = " + delay + ", int[] params = "
@@ -170,8 +154,6 @@ public class Coordinator extends TKTestRunner
this.reportDir = reportDir;
this.engine = engine;
this.terminate = terminate;
- this.csvResults = csv;
- this.xmlResults = xml;
}
/**
@@ -547,87 +529,4 @@ public class Coordinator extends TKTestRunner
return new InteropTestDecorator(targetTest, enlistedClients, conversationFactory, connection);
}
}
-
- /**
- * Creates the TestResult object to be used for test runs.
- *
- * @return An instance of the test result object.
- */
- protected TestResult createTestResult()
- {
- log.debug("protected TestResult createTestResult(): called");
-
- TKTestResult result = new TKTestResult(fPrinter.getWriter(), delay, verbose, testCaseName);
-
- // Check if a directory to output reports to has been specified and attach test listeners if so.
- if (reportDir != null)
- {
- // Create the report directory if it does not already exist.
- File reportDirFile = new File(reportDir);
-
- if (!reportDirFile.exists())
- {
- reportDirFile.mkdir();
- }
-
- // Create the results file (make the name of this configurable as a command line parameter).
- Writer timingsWriter;
-
- // Set up an XML results listener to output the timings to the results file, if requested on the command line.
- if (xmlResults)
- {
- try
- {
- File timingsFile = new File(reportDirFile, "TEST." + currentTestClassName + ".xml");
- timingsWriter = new BufferedWriter(new FileWriter(timingsFile), 20000);
- }
- catch (IOException e)
- {
- throw new RuntimeException("Unable to create the log file to write test results to: " + e, e);
- }
-
- XMLTestListener listener = new XMLTestListener(timingsWriter, currentTestClassName);
- result.addListener(listener);
- result.addTKTestListener(listener);
-
- registerShutdownHook(listener);
- }
-
- // Set up an CSV results listener to output the timings to the results file, if requested on the command line.
- if (csvResults)
- {
- try
- {
- File timingsFile =
- new File(reportDirFile, testRunName + "-" + TIME_STAMP_FORMAT.format(new Date()) + "-timings.csv");
- timingsWriter = new BufferedWriter(new FileWriter(timingsFile), 20000);
- }
- catch (IOException e)
- {
- throw new RuntimeException("Unable to create the log file to write test results to: " + e, e);
- }
-
- CSVTestListener listener = new CSVTestListener(timingsWriter);
- result.addListener(listener);
- result.addTKTestListener(listener);
-
- // Register the results listeners shutdown hook to flush its data if the test framework is shutdown
- // prematurely.
- registerShutdownHook(listener);
- }
-
- // Register the results listeners shutdown hook to flush its data if the test framework is shutdown
- // prematurely.
- // registerShutdownHook(listener);
-
- // Record the start time of the batch.
- // result.notifyStartBatch();
-
- // At this point in time the test class has been instantiated, giving it an opportunity to read its parameters.
- // Inform any test listers of the test properties.
- result.notifyTestProperties(TestContextProperties.getAccessedProps());
- }
-
- return result;
- }
}
diff --git a/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/LocalCircuitImpl.java b/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/LocalCircuitImpl.java
index ff7330f483..010669a7c2 100644
--- a/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/LocalCircuitImpl.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/LocalCircuitImpl.java
@@ -342,7 +342,7 @@ public class LocalCircuitImpl implements Circuit
}
catch (JMSException e)
{
- throw new RuntimeException("Got JMSException during close.", e);
+ throw new RuntimeException("Got JMSException during close:" + e.getMessage(), e);
}
}
@@ -401,17 +401,17 @@ public class LocalCircuitImpl implements Circuit
}
// Inject a short pause to allow time for exceptions to come back asynchronously.
- TestUtils.pause(100L);
+ TestUtils.pause(500L);
// Request a status report.
check();
- // Apply all of the requested assertions, keeping record of any that fail.
- List<Assertion> failures = applyAssertions(assertions);
-
// Clean up the publisher/receivers/controlSession/connections.
close();
+ // Apply all of the requested assertions, keeping record of any that fail.
+ List<Assertion> failures = applyAssertions(assertions);
+
// Return any failed assertions to the caller.
return failures;
}
diff --git a/python/tests/basic.py b/python/tests/basic.py
index 9f26ee3728..bbbfa8ebf9 100644
--- a/python/tests/basic.py
+++ b/python/tests/basic.py
@@ -339,9 +339,11 @@ class BasicTests(TestBase):
channel = self.channel
channel.queue_declare(queue="test-get", exclusive=True)
- #publish some messages (no_ack=True)
+ #publish some messages (no_ack=True) with persistent messaging
for i in range(1, 11):
- channel.basic_publish(routing_key="test-get", content=Content("Message %d" % i))
+ msg=Content("Message %d" % i)
+ msg["delivery mode"] = 2
+ channel.basic_publish(routing_key="test-get",content=msg )
#use basic_get to read back the messages, and check that we get an empty at the end
for i in range(1, 11):
@@ -354,18 +356,53 @@ class BasicTests(TestBase):
self.assertEqual(reply.method.klass.name, "basic")
self.assertEqual(reply.method.name, "get-empty")
- #repeat for no_ack=False
+
+ #publish some messages (no_ack=True) transient messaging
for i in range(11, 21):
channel.basic_publish(routing_key="test-get", content=Content("Message %d" % i))
+ #use basic_get to read back the messages, and check that we get an empty at the end
for i in range(11, 21):
+ reply = channel.basic_get(no_ack=True)
+ self.assertEqual(reply.method.klass.name, "basic")
+ self.assertEqual(reply.method.name, "get-ok")
+ self.assertEqual("Message %d" % i, reply.content.body)
+
+ reply = channel.basic_get(no_ack=True)
+ self.assertEqual(reply.method.klass.name, "basic")
+ self.assertEqual(reply.method.name, "get-empty")
+
+ #repeat for no_ack=False
+
+ #publish some messages (no_ack=False) with persistent messaging
+ for i in range(21, 31):
+ msg=Content("Message %d" % i)
+ msg["delivery mode"] = 2
+ channel.basic_publish(routing_key="test-get",content=msg )
+
+ #use basic_get to read back the messages, and check that we get an empty at the end
+ for i in range(21, 31):
+ reply = channel.basic_get(no_ack=False)
+ self.assertEqual(reply.method.klass.name, "basic")
+ self.assertEqual(reply.method.name, "get-ok")
+ self.assertEqual("Message %d" % i, reply.content.body)
+
+ reply = channel.basic_get(no_ack=True)
+ self.assertEqual(reply.method.klass.name, "basic")
+ self.assertEqual(reply.method.name, "get-empty")
+
+ #public some messages (no_ack=False) with transient messaging
+ for i in range(31, 41):
+ channel.basic_publish(routing_key="test-get", content=Content("Message %d" % i))
+
+ for i in range(31, 41):
reply = channel.basic_get(no_ack=False)
self.assertEqual(reply.method.klass.name, "basic")
self.assertEqual(reply.method.name, "get-ok")
self.assertEqual("Message %d" % i, reply.content.body)
- if(i == 13):
+ if(i == 33):
channel.basic_ack(delivery_tag=reply.delivery_tag, multiple=True)
- if(i in [15, 17, 19]):
+ if(i in [35, 37, 39]):
channel.basic_ack(delivery_tag=reply.delivery_tag)
reply = channel.basic_get(no_ack=True)
@@ -375,8 +412,8 @@ class BasicTests(TestBase):
#recover(requeue=True)
channel.basic_recover(requeue=True)
- #get the unacked messages again (14, 16, 18, 20)
- for i in [14, 16, 18, 20]:
+ #get the unacked messages again (34, 36, 38, 40)
+ for i in [34, 36, 38, 40]:
reply = channel.basic_get(no_ack=False)
self.assertEqual(reply.method.klass.name, "basic")
self.assertEqual(reply.method.name, "get-ok")