Package org.apache.qpid.client

Examples of org.apache.qpid.client.AMQConnectionFactory


                            "'tcp://%s:%s?retries='%s'&connectdelay='%s''&failover='singlebroker?cyclecount='%s''";

        String newUrl = String.format(newUrlFormat, origBrokerDetails.getHost(), origBrokerDetails.getPort(),
                                                    retries, connectdelay, cycleCount);

        ConnectionFactory connectionFactory = new AMQConnectionFactory(newUrl);
        AMQConnection connection = (AMQConnection) connectionFactory.createConnection("admin", "admin");
        connection.setConnectionListener(this);
        return connection;
    }
View Full Code Here


        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        Properties properties = new Properties();
        properties.load(QpidClient.class.getResourceAsStream("/amqp.properties"));

        AMQConnectionFactory connectionFactory = new AMQConnectionFactory(properties.getProperty("qpidConnectionfactory"));
        Connection connection = connectionFactory.createConnection("guest", "guest");
        connection.start();

        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        System.out.println("Type your name:");
        String name = reader.readLine();
View Full Code Here

public class QpidConnection {

    @Produces
    @Named("qpidConnectionFactory")
    public AMQConnectionFactory createConnectionFactory() throws URLSyntaxException {
        return new AMQConnectionFactory("amqp://guest:guest@/test?brokerlist='tcp://localhost:5672'");
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.client.AMQConnectionFactory

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.