Package org.apache.activemq.command

Examples of org.apache.activemq.command.ActiveMQTopic


    }

    public void initCombosForTestConnectionCloseCascades() {
        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
        addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST"),
                                                          new ActiveMQQueue("TEST")});
    }
View Full Code Here


    }
   
    public void fastProducer(ConnectionContext context,ProducerInfo producerInfo) {
        super.fastProducer(context, producerInfo);
        try {
            ActiveMQTopic topic = AdvisorySupport.getFastProducerAdvisoryTopic(producerInfo.getDestination());
            ActiveMQMessage advisoryMessage = new ActiveMQMessage();
            advisoryMessage.setStringProperty(AdvisorySupport.MSG_PROPERTY_PRODUCER_ID, producerInfo.getProducerId().toString());
            fireAdvisory(context, topic, producerInfo, null, advisoryMessage);
        } catch (Exception e) {
            LOG.warn("Failed to fire message fast producer advisory");
View Full Code Here

    }
   
    public void isFull(ConnectionContext context,Destination destination,Usage usage) {
        super.isFull(context,destination, usage);
        try {
            ActiveMQTopic topic = AdvisorySupport.getFullAdvisoryTopic(destination.getActiveMQDestination());
            ActiveMQMessage advisoryMessage = new ActiveMQMessage();          
            advisoryMessage.setStringProperty(AdvisorySupport.MSG_PROPERTY_USAGE_NAME, usage.getName());
            fireAdvisory(context, topic,null,null,advisoryMessage);
        } catch (Exception e) {
            LOG.warn("Failed to fire message is full advisory");
View Full Code Here

    }
   
    public void nowMasterBroker() {  
        super.nowMasterBroker();
        try {
            ActiveMQTopic topic = AdvisorySupport.getMasterBrokerAdvisoryTopic();
            ActiveMQMessage advisoryMessage = new ActiveMQMessage();                      
            ConnectionContext context = new ConnectionContext();
            context.setBroker(getBrokerService().getBroker());
            fireAdvisory(context, topic,null,null,advisoryMessage);
        } catch (Exception e) {
View Full Code Here

    }

    public void initCombosForTestSessionCloseCascades() {
        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
        addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST"),
                                                          new ActiveMQQueue("TEST")});
    }
View Full Code Here

    }

    public void initCombosForTestConsumerClose() {
        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
        addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST"),
                                                          new ActiveMQQueue("TEST")});
    }
View Full Code Here

                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
    }

    public void testTopicNoLocal() throws Exception {

        ActiveMQDestination destination = new ActiveMQTopic("TEST");

        // Setup a first connection
        StubConnection connection1 = createConnection();
        ConnectionInfo connectionInfo1 = createConnectionInfo();
        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
View Full Code Here

                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
    }

    public void testTopicDispatchIsBroadcast() throws Exception {

        ActiveMQDestination destination = new ActiveMQTopic("TEST");

        // Setup a first connection
        StubConnection connection1 = createConnection();
        ConnectionInfo connectionInfo1 = createConnectionInfo();
        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
View Full Code Here

        assertTrue(countMessagesInQueue(connection, connectionInfo, destination) == 1);

    }

    public void initCombosForTestSelectorSkipsMessages() {
        addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST_TOPIC"),
                                                          new ActiveMQQueue("TEST_QUEUE")});
        addCombinationValues("destinationType",
                             new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
                                           Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
                                           Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
View Full Code Here

public class PooledTopicPublisherTest extends TestSupport {

    private TopicConnection connection;

    public void testPooledConnectionFactory() throws Exception {
        ActiveMQTopic topic = new ActiveMQTopic("test");
        PooledConnectionFactory pcf = new PooledConnectionFactory();
        pcf.setConnectionFactory(new ActiveMQConnectionFactory("vm://test"));

        connection = (TopicConnection) pcf.createConnection();
        TopicSession session = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
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.