summaryrefslogtreecommitdiff
path: root/qpid
diff options
context:
space:
mode:
Diffstat (limited to 'qpid')
-rw-r--r--qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/Listener.java38
1 files changed, 29 insertions, 9 deletions
diff --git a/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/Listener.java b/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/Listener.java
index 8098f62be9..c8e5d89099 100644
--- a/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/Listener.java
+++ b/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/Listener.java
@@ -101,8 +101,13 @@ public class Listener
javax.jms.TopicSubscriber messageSubscriber=session.createSubscriber(topic);
// Bind each topic queue to the control queue so we know when to stop
- // Warning: this is an AMQP specific code
- ((TopicSubscriber) messageSubscriber).addBindingKey( topic, "control");
+ /**
+ * The following line uses a temporary, experimental
+ * Qpid extension to add another binding to the topic's private queue.
+ * This extension is expected to be replaced by an alternative,
+ * less intrusive scheme in the very near future.
+ */
+ ((TopicSubscriber) messageSubscriber).addBindingKey(topic, "control");
// Set a message listener on the messageConsumer
messageSubscriber.setMessageListener(new MyMessageListener("usa"));
@@ -114,8 +119,13 @@ public class Listener
messageSubscriber=session.createSubscriber(topic);
// Bind each topic queue to the control queue so we know when to stop
- // Warning: this is an AMQP specific code
- ((org.apache.qpid.jms.TopicSubscriber) messageSubscriber).addBindingKey( topic, "control");
+ /**
+ * The following line uses a temporary, experimental
+ * Qpid extension to add another binding to the topic's private queue.
+ * This extension is expected to be replaced by an alternative,
+ * less intrusive scheme in the very near future.
+ */
+ ((org.apache.qpid.jms.TopicSubscriber) messageSubscriber).addBindingKey(topic, "control");
// Set a message listener on the messageConsumer
messageSubscriber.setMessageListener(new MyMessageListener("europe"));
@@ -127,8 +137,13 @@ public class Listener
messageSubscriber=session.createSubscriber(topic);
// Bind each topic queue to the control queue so we know when to stop
- // Warning: this is an AMQP specific code
- ((org.apache.qpid.jms.TopicSubscriber) messageSubscriber).addBindingKey( topic, "control");
+ /**
+ * The following line uses a temporary, experimental
+ * Qpid extension to add another binding to the topic's private queue.
+ * This extension is expected to be replaced by an alternative,
+ * less intrusive scheme in the very near future.
+ */
+ ((org.apache.qpid.jms.TopicSubscriber) messageSubscriber).addBindingKey(topic, "control");
// Set a message listener on the messageConsumer
messageSubscriber.setMessageListener(new MyMessageListener("news"));
@@ -140,9 +155,14 @@ public class Listener
messageSubscriber=session.createSubscriber(topic);
// Bind each topic queue to the control queue so we know when to stop
- // Warning: this is an AMQP specific code
- ((org.apache.qpid.jms.TopicSubscriber) messageSubscriber).addBindingKey( topic, "control");
-
+ /**
+ * The following line uses a temporary, experimental
+ * Qpid extension to add another binding to the topic's private queue.
+ * This extension is expected to be replaced by an alternative,
+ * less intrusive scheme in the very near future.
+ */
+ ((org.apache.qpid.jms.TopicSubscriber) messageSubscriber).addBindingKey(topic, "control");
+
// Set a message listener on the messageConsumer
messageSubscriber.setMessageListener(new MyMessageListener("weather"));