diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2007-02-16 23:11:41 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2007-02-16 23:11:41 +0000 |
| commit | dd8df96fcca8f5f9dcbe91ba012cff400a38daa7 (patch) | |
| tree | ee84d98ec82abd31dd486f98fea1cb6bdb526db5 /java/perftests/src | |
| parent | 6213309b7c179fdddfeca0273d5c1f6592adedd7 (diff) | |
| download | qpid-python-dd8df96fcca8f5f9dcbe91ba012cff400a38daa7.tar.gz | |
QPID-375 : remove assumptions on standard exchanges (amq.direct, amq.topic, etc), allow other exchanges to be created through virtualhosts.xml
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@508649 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/perftests/src')
4 files changed, 12 insertions, 8 deletions
diff --git a/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongBouncer.java b/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongBouncer.java index ab795d0459..78ab7c4c73 100644 --- a/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongBouncer.java +++ b/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongBouncer.java @@ -35,6 +35,7 @@ import org.apache.qpid.client.AMQTopic; import org.apache.qpid.jms.ConnectionListener;
import org.apache.qpid.jms.Session;
import org.apache.qpid.topic.Config;
+import org.apache.qpid.exchange.ExchangeDefaults;
/**
* PingPongBouncer is a message listener the bounces back messages to their reply to destination. This is used to return
@@ -414,11 +415,11 @@ public class PingPongBouncer implements MessageListener {
if (isPubSub())
{
- _consumerDestination = new AMQTopic(name);
+ _consumerDestination = new AMQTopic(ExchangeDefaults.TOPIC_EXCHANGE_NAME, name);
}
else
{
- _consumerDestination = new AMQQueue(name);
+ _consumerDestination = new AMQQueue(ExchangeDefaults.DIRECT_EXCHANGE_NAME, name);
}
}
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 8def95f7b1..57d5c37fc6 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 @@ -43,6 +43,7 @@ import org.apache.qpid.client.message.TestMessageFactory; import org.apache.qpid.jms.MessageProducer;
import org.apache.qpid.jms.Session;
import org.apache.qpid.topic.Config;
+import org.apache.qpid.exchange.ExchangeDefaults;
import uk.co.thebadgerset.junit.extensions.BatchedThrottle;
import uk.co.thebadgerset.junit.extensions.Throttle;
@@ -704,13 +705,13 @@ public class PingPongProducer implements Runnable, MessageListener, ExceptionLis if (_isPubSub)
{
_logger.debug("Creating topics.");
- destination = new AMQTopic(rootName + id);
+ destination = new AMQTopic(ExchangeDefaults.TOPIC_EXCHANGE_NAME, rootName + id);
}
// Otherwise this is a p2p pinger, in which case create queues.
else
{
_logger.debug("Creating queues.");
- destination = new AMQQueue(rootName + id);
+ destination = new AMQQueue(ExchangeDefaults.DIRECT_EXCHANGE_NAME, rootName + id);
}
// Keep the destination.
diff --git a/java/perftests/src/main/java/org/apache/qpid/topic/Listener.java b/java/perftests/src/main/java/org/apache/qpid/topic/Listener.java index 76a0690b8c..54f5a0f660 100644 --- a/java/perftests/src/main/java/org/apache/qpid/topic/Listener.java +++ b/java/perftests/src/main/java/org/apache/qpid/topic/Listener.java @@ -31,6 +31,7 @@ import org.apache.qpid.client.AMQConnection; import org.apache.qpid.client.AMQQueue; import org.apache.qpid.client.AMQSession; import org.apache.qpid.client.AMQTopic; +import org.apache.qpid.exchange.ExchangeDefaults; /** * This class has not kept up to date with the topic_listener in the cpp tests. It should provide identical behaviour for @@ -97,9 +98,9 @@ public class Listener implements MessageListener if (_session instanceof AMQSession) { - _topic = new AMQTopic(CONTROL_TOPIC); + _topic = new AMQTopic(ExchangeDefaults.TOPIC_EXCHANGE_NAME, CONTROL_TOPIC); //_control = new AMQTopic(CONTROL_TOPIC); - _response = new AMQQueue(RESPONSE_QUEUE); + _response = new AMQQueue(ExchangeDefaults.DIRECT_EXCHANGE_NAME, RESPONSE_QUEUE); } else { diff --git a/java/perftests/src/main/java/org/apache/qpid/topic/MessageFactory.java b/java/perftests/src/main/java/org/apache/qpid/topic/MessageFactory.java index 8b87f76c3e..4efdc1cb56 100644 --- a/java/perftests/src/main/java/org/apache/qpid/topic/MessageFactory.java +++ b/java/perftests/src/main/java/org/apache/qpid/topic/MessageFactory.java @@ -24,6 +24,7 @@ import javax.jms.*; import org.apache.qpid.client.AMQSession; import org.apache.qpid.client.AMQTopic; +import org.apache.qpid.exchange.ExchangeDefaults; /** */ @@ -46,8 +47,8 @@ class MessageFactory _session = session; if (session instanceof AMQSession) { - _topic = new AMQTopic("topic_control"); - _control = new AMQTopic("topictest.control"); + _topic = new AMQTopic(ExchangeDefaults.TOPIC_EXCHANGE_NAME, "topic_control"); + _control = new AMQTopic(ExchangeDefaults.TOPIC_EXCHANGE_NAME, "topictest.control"); } else { |
