Package org.apache.activemq.broker.inteceptor

Examples of org.apache.activemq.broker.inteceptor.MessageInterceptor


    public void testNoStackOverFlow() throws Exception {


        final MessageInterceptorRegistry registry = MessageInterceptorRegistry.getInstance().get(BrokerRegistry.getInstance().findFirst());
        registry.addMessageInterceptorForTopic(topic.getTopicName(), new MessageInterceptor() {
            @Override
            public void intercept(ProducerBrokerExchange producerExchange, Message message) {

                try {
                    registry.injectMessage(producerExchange, message);
View Full Code Here


        assertEquals(0,latch.getCount());
    }

    public void testInterceptorAll() throws Exception {
        MessageInterceptorRegistry registry = MessageInterceptorRegistry.getInstance().get(BrokerRegistry.getInstance().findFirst());
        registry.addMessageInterceptorForTopic(topic.getTopicName(), new MessageInterceptor() {
            @Override
            public void intercept(ProducerBrokerExchange producerExchange, Message message) {
                //just ignore
            }
        });
View Full Code Here

    public void testReRouteAll() throws Exception {
        final ActiveMQQueue queue = new ActiveMQQueue("Reroute.From."+topic.getTopicName());

        final MessageInterceptorRegistry registry = MessageInterceptorRegistry.getInstance().get(BrokerRegistry.getInstance().findFirst());
        registry.addMessageInterceptorForTopic(topic.getTopicName(), new MessageInterceptor() {
            @Override
            public void intercept(ProducerBrokerExchange producerExchange, Message message) {
                message.setDestination(queue);
                try {
                    registry.injectMessage(producerExchange, message);
View Full Code Here

    public void testReRouteAllWithNullProducerExchange() throws Exception {
        final ActiveMQQueue queue = new ActiveMQQueue("Reroute.From."+topic.getTopicName());

        final MessageInterceptorRegistry registry = MessageInterceptorRegistry.getInstance().get(BrokerRegistry.getInstance().findFirst());
        registry.addMessageInterceptorForTopic(topic.getTopicName(), new MessageInterceptor() {
            @Override
            public void intercept(ProducerBrokerExchange producerExchange, Message message) {
                message.setDestination(queue);
                try {
                    registry.injectMessage(producerExchange, message);
View Full Code Here

    public void testReRouteAllowWildCards() throws Exception {

        final ActiveMQQueue testQueue = new ActiveMQQueue("testQueueFor."+getName());

        final MessageInterceptorRegistry registry = MessageInterceptorRegistry.getInstance().get(BrokerRegistry.getInstance().findFirst());
        registry.addMessageInterceptorForTopic(">", new MessageInterceptor() {
            @Override
            public void intercept(ProducerBrokerExchange producerExchange, Message message) {

                try {
                    message.setDestination(testQueue);
View Full Code Here

TOP

Related Classes of org.apache.activemq.broker.inteceptor.MessageInterceptor

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.