Examples of ActiveMQConnection


Examples of org.apache.activemq.ActiveMQConnection

    public void testRedeliveryViaCamel() throws Exception {
       
       
        ActiveMQConnectionFactory factory = applicationContext.getBean("connectionFactory", ActiveMQConnectionFactory.class);
        ActiveMQConnection connection = (ActiveMQConnection) factory.createConnection();
       
        // send message to dlq immediately
        RedeliveryPolicy policy = connection.getRedeliveryPolicy();
        policy.setMaximumRedeliveries(0);       
        connection.start();
       
        Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
        ActiveMQQueue destination = new ActiveMQQueue("camelRedeliveryQ");
        MessageProducer producer = session.createProducer(destination);
       
        MessageConsumer consumer = session.createConsumer(destination);
        // Send the messages
View Full Code Here

Examples of org.codehaus.activemq.ActiveMQConnection

        this(connector.threadPool);
        this.brokerContainer = brokerContainer;
        this.uri = "";
        ActiveMQConnectionFactory fac = new ActiveMQConnectionFactory();
        fac.setUseAsyncSend(true);
        remoteConnection = new ActiveMQConnection(fac, remoteUserName, remotePassword, channel);
        remoteConnection.setUseAsyncSend(true);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.