Package org.apache.activemq.broker.region

Examples of org.apache.activemq.broker.region.Destination


    }
   
    protected int getMinimumMessageSize() {
        int result = DEFAULT_MINIMUM_MESSAGE_SIZE;
        //let destination override
        Destination dest = regionDestination;
        if (dest != null) {
            result=dest.getMinimumMessageSize();
        }
        return result;
    }
View Full Code Here


    public void testUnsubscribe() throws Exception {
        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        session.createDurableSubscriber(topic, "SubsId");
        session.close();

        Destination d = broker.getDestination(topic);
        assertEquals("Subscription is missing.", 1, d.getConsumers().size());

        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        session.unsubscribe("SubsId");
        session.close();

        assertEquals("Subscription exists.", 0, d.getConsumers().size());
    }
View Full Code Here

        connection.close();
        connection = null;
        Thread.sleep(1000);

        Destination d = broker.getDestination(topic);
        assertEquals("Subscription is missing.", 1, d.getConsumers().size());

        MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
        ObjectName[] subNames = broker.getAdminView().getDurableTopicSubscribers();
        mbs.invoke(subNames[0], "destroy", new Object[0], new String[0]);

        assertEquals("Subscription exists.", 0, d.getConsumers().size());
    }
View Full Code Here

        super(next, file);
    }

    @Override
    public Destination addDestination(ConnectionContext context, ActiveMQDestination destination,boolean create) throws Exception {
        Destination answer = super.addDestination(context, destination,create);
        generateFile();
        return answer;
    }
View Full Code Here

            producers.put(info.getProducerId(), info);
        }
    }
   
    public Destination addDestination(ConnectionContext context, ActiveMQDestination destination) throws Exception {
        Destination answer = next.addDestination(context, destination)
     
        ActiveMQTopic topic = AdvisorySupport.getDestinationAdvisoryTopic(destination);
        DestinationInfo info = new DestinationInfo(context.getConnectionId(), DestinationInfo.ADD_OPERATION_TYPE, destination);
        fireAdvisory(context, topic, info);       
        destinations.put(destination, info);
View Full Code Here

        regionBroker.unregisterSubscription(sub);
        super.destroySubscription(sub);
    }

    protected Destination createDestination(ConnectionContext context, ActiveMQDestination destination) throws Exception {
        Destination rc = super.createDestination(context, destination);
        regionBroker.register(destination, rc);
        return rc;
    }
View Full Code Here

        regionBroker.unregisterSubscription(sub);
        super.destroySubscription(sub);
    }

    protected Destination createDestination(ConnectionContext context, ActiveMQDestination destination) throws Exception {
        Destination rc = super.createDestination(context, destination);
        regionBroker.register(destination, rc);
        return rc;
    }
View Full Code Here

        regionBroker.unregisterSubscription(sub);
        super.destroySubscription(sub);
    }

    protected Destination createDestination(ConnectionContext context, ActiveMQDestination destination) throws Exception {
        Destination rc = super.createDestination(context, destination);
        regionBroker.register(destination, rc);
        return rc;
    }
View Full Code Here

                if(!msg.isPersistent()){
                    nonPersistent.addMessageLast(node);
                }
            }
            if(msg.isPersistent()){
                Destination dest=msg.getRegionDestination();
                TopicStorePrefetch tsp=(TopicStorePrefetch)topics.get(dest);
                if(tsp!=null){
                    tsp.addMessageLast(node);
                    if(started){
                        // if the store has been empty - then this message is next to dispatch
View Full Code Here

                if (!msg.isPersistent()) {
                    nonPersistent.addMessageLast(node);
                }
            }
            if (msg.isPersistent()) {
                Destination dest = msg.getRegionDestination();
                TopicStorePrefetch tsp = topics.get(dest);
                if (tsp != null) {
                    tsp.addMessageLast(node);
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.activemq.broker.region.Destination

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.