Package org.apache.activemq.command

Examples of org.apache.activemq.command.ActiveMQTopic


*/
public class RetroactiveConsumerTestWithLastImagePolicyWithWildcardTest extends RetroactiveConsumerTestWithSimpleMessageListTest {
    private int counter = 1;

    protected void sendMessage(MessageProducer producer, TextMessage message) throws JMSException {
        ActiveMQTopic topic = new ActiveMQTopic(destination.toString() + "." + (counter++));
        // System.out.println("Sending to destination: " + topic);
        producer.send(topic, message);
    }
View Full Code Here


    protected MessageProducer createProducer() throws JMSException {
        return session.createProducer(null);
    }

    protected MessageConsumer createConsumer() throws JMSException {
        return session.createConsumer(new ActiveMQTopic(destination.toString() + ".>"));
    }
View Full Code Here

                } else if (destination instanceof TemporaryTopic) {
                    activeMQDestination = new ActiveMQTempTopic(((Topic)destination).getTopicName());
                } else if (destination instanceof Queue) {
                    activeMQDestination = new ActiveMQQueue(((Queue)destination).getQueueName());
                } else if (destination instanceof Topic) {
                    activeMQDestination = new ActiveMQTopic(((Topic)destination).getTopicName());
                }
            }
        }

        return activeMQDestination;
View Full Code Here

        return new ActiveMQMessage();
    }

    protected Destination createDestination(String subject) {
        if (topic) {
            return new ActiveMQTopic(subject);
        } else {
            return new ActiveMQQueue(subject);
        }
    }
View Full Code Here

    /**
     * A helper method to set the destination from a configuration file
     */
    public void setTopic(String name) {
        setDestination(new ActiveMQTopic(name));
    }
View Full Code Here

        return CONNECTION_ADVISORY_TOPIC;
    }

    public static ActiveMQTopic getConsumerAdvisoryTopic(ActiveMQDestination destination) {
        if (destination.isQueue()) {
            return new ActiveMQTopic(QUEUE_CONSUMER_ADVISORY_TOPIC_PREFIX + destination.getPhysicalName());
        } else {
            return new ActiveMQTopic(TOPIC_CONSUMER_ADVISORY_TOPIC_PREFIX + destination.getPhysicalName());
        }
    }
View Full Code Here

        }
    }

    public static ActiveMQTopic getProducerAdvisoryTopic(ActiveMQDestination destination) {
        if (destination.isQueue()) {
            return new ActiveMQTopic(QUEUE_PRODUCER_ADVISORY_TOPIC_PREFIX + destination.getPhysicalName());
        } else {
            return new ActiveMQTopic(TOPIC_PRODUCER_ADVISORY_TOPIC_PREFIX + destination.getPhysicalName());
        }
    }
View Full Code Here

        return getExpiredTopicMessageAdvisoryTopic(destination);
    }

    public static ActiveMQTopic getExpiredTopicMessageAdvisoryTopic(ActiveMQDestination destination) {
        String name = EXPIRED_TOPIC_MESSAGES_TOPIC_PREFIX + destination.getPhysicalName();
        return new ActiveMQTopic(name);
    }
View Full Code Here

        return new ActiveMQTopic(name);
    }

    public static ActiveMQTopic getExpiredQueueMessageAdvisoryTopic(ActiveMQDestination destination) {
        String name = EXPIRED_QUEUE_MESSAGES_TOPIC_PREFIX + destination.getPhysicalName();
        return new ActiveMQTopic(name);
    }
View Full Code Here

        return new ActiveMQTopic(name);
    }

    public static ActiveMQTopic getNoTopicConsumersAdvisoryTopic(ActiveMQDestination destination) {
        String name = NO_TOPIC_CONSUMERS_TOPIC_PREFIX + destination.getPhysicalName();
        return new ActiveMQTopic(name);
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.command.ActiveMQTopic

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.