Package org.apache.qpid.transport

Examples of org.apache.qpid.transport.Session.queueDeclare()


    {
        Connection conn = new Connection();
        conn.connect("localhost", QpidBrokerTestCase.DEFAULT_PORT, "test", "guest", "guest",false);
        Session sess = conn.createSession(0);
        sess.exchangeDeclare(exch, "direct", null, null);
        sess.queueDeclare(qname, null, null);
        sess.exchangeBind(qname, exch, routkey, null);
        sess.sync();
        conn.close();       
    }
View Full Code Here


                throw new Exception("unsupported test " +
                        "configuration. broker: " + _broker + " version > 0.10 "+ !isBroker08() + " This test must be run on a local broker using protocol 0.10 or higher.");
            }
            Session sess = conn.createSession(0);
            sess.exchangeDeclare(exch, "direct", null, null);
            sess.queueDeclare(qname, null, null);
            sess.exchangeBind(qname, exch, routkey, null);
            sess.sync();
            conn.close();       
    }
View Full Code Here

        // Create session
        Session session = con.createSession(0);

        // declare and bind queue
        session.queueDeclare("message_queue", null, null);
        session.exchangeBind("message_queue", "amq.direct", "routing_key", null);

        // confirm completion
        session.sync();
View Full Code Here

        // Create session
        Session session = con.createSession(0);

        // declare and bind queue
        session.queueDeclare("message_queue", null, null);
        session.exchangeBind("message_queue", "amq.fanout",null, null);

        // confirm completion
        session.sync();
View Full Code Here

        // Create session
        Session session = con.createSession(0);

        // declare and bind queues
        session.queueDeclare("headers_queue_any", null, null);
        session.queueDeclare("headers_queue_all", null, null);
        // we need to declare the header: name, type, alternate exchange
        session.exchangeDeclare("test.headers", "headers", "amq.direct", null);
        // The matching algorithm is controlled by 'x-match' property
        // 'x-match' can take one of two values,
View Full Code Here

        // Create session
        Session session = con.createSession(0);

        // declare and bind queues
        session.queueDeclare("headers_queue_any", null, null);
        session.queueDeclare("headers_queue_all", null, null);
        // we need to declare the header: name, type, alternate exchange
        session.exchangeDeclare("test.headers", "headers", "amq.direct", null);
        // The matching algorithm is controlled by 'x-match' property
        // 'x-match' can take one of two values,
        // (i) 'all' implies that all the other pairs must match the headers
View Full Code Here

        Map<String, Object> arguments = new HashMap<String, Object>();
        // We use a lvq
        arguments.put("qpid.last_value_queue", true);
        // We want this queue to use the key test
        arguments.put("qpid.LVQ_key", "test");
        session.queueDeclare("message_queue", null, arguments);
        session.exchangeBind("message_queue", "amq.direct", "routing_key", null);

        // confirm completion
        session.sync();
View Full Code Here

                throw new Exception("unsupported test " +
                        "configuration. broker: " + _broker + " version > 0.10 "+ !isBroker08() + " This test must be run on a local broker using protocol 0.10 or higher.");
            }
            Session sess = conn.createSession(0);
            sess.exchangeDeclare(exch, "direct", null, null);
            sess.queueDeclare(qname, null, null);
            sess.exchangeBind(qname, exch, routkey, null);
            sess.sync();
            conn.close();       
    }
View Full Code Here

                throw new Exception("unsupported test " +
                        "configuration. broker: " + _broker + " version > 0.10 "+ !isBroker08() + " This test must be run on a local broker using protocol 0.10 or higher.");
            }
            Session sess = conn.createSession(0);
            sess.exchangeDeclare(exch, "direct", null, null);
            sess.queueDeclare(qname, null, null);
            sess.exchangeBind(qname, exch, routkey, null);
            sess.sync();
            conn.close();       
    }
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.