Author: rajith
Date: Wed Nov 28 11:47:26 2007
New Revision: 599117
URL: http://svn.apache.org/viewvc?rev=599117&view=rev
Log:
Added the -DuseQueue option to switch between pub/sub and p2p.
If useQueue is present then we use p2p.
Modified:
incubator/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/client/perf/MessageConsumerTest.java
incubator/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/client/perf/MessageProducerTest.java
incubator/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/client/perf/Options.java
Modified:
incubator/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/client/perf/MessageConsumerTest.java
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/client/perf/MessageConsumerTest.java?rev=599117&r1=599116&r2=599117&view=diff
==============================================================================
---
incubator/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/client/perf/MessageConsumerTest.java
(original)
+++
incubator/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/client/perf/MessageConsumerTest.java
Wed Nov 28 11:47:26 2007
@@ -10,6 +10,7 @@
import javax.jms.Session;
import org.apache.qpid.client.AMQConnection;
+import org.apache.qpid.client.AMQQueue;
import org.apache.qpid.client.AMQTopic;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -47,7 +48,7 @@
{
AMQConnection con = ConnectionUtility.getInstance().getConnection();
con.start();
- Destination dest = new AMQTopic(con, routingKey);
+ Destination dest = Boolean.getBoolean("useQueue")? new
AMQQueue(con,routingKey) : new AMQTopic(con,routingKey);
JMSConsumer prod;
if (_synchronous)
{
Modified:
incubator/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/client/perf/MessageProducerTest.java
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/client/perf/MessageProducerTest.java?rev=599117&r1=599116&r2=599117&view=diff
==============================================================================
---
incubator/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/client/perf/MessageProducerTest.java
(original)
+++
incubator/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/client/perf/MessageProducerTest.java
Wed Nov 28 11:47:26 2007
@@ -10,6 +10,7 @@
import javax.jms.Destination;
import org.apache.qpid.client.AMQConnection;
+import org.apache.qpid.client.AMQQueue;
import org.apache.qpid.client.AMQTopic;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -46,7 +47,7 @@
{
AMQConnection con = ConnectionUtility.getInstance().getConnection();
con.start();
- Destination dest = new AMQTopic(con,routingKey);
+ Destination dest = Boolean.getBoolean("useQueue")? new
AMQQueue(con,routingKey) : new AMQTopic(con,routingKey);
JMSProducer prod = new
JMSProducer(String.valueOf(_count),(Connection)con, dest,_messageSize,
_transacted);
Thread t = new Thread(prod);
t.setName("JMSProducer-"+_count);
Modified:
incubator/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/client/perf/Options.java
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/client/perf/Options.java?rev=599117&r1=599116&r2=599117&view=diff
==============================================================================
---
incubator/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/client/perf/Options.java
(original)
+++
incubator/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/client/perf/Options.java
Wed Nov 28 11:47:26 2007
@@ -15,6 +15,7 @@
/**
* System props
* -DmessageSize
+ * -DuseQueue
* -Dtransacted
* -DproducerCount
* -DconsumerCount