Package org.apache.qpid.transport

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


        listener.prepareQueue(session,"europe", "europe.#");
        listener.prepareQueue(session,"news", "#.news");
        listener.prepareQueue(session,"weather", "#.weather");

        // confirm completion
        session.sync();

        System.out.println("Waiting 100 seconds for messages");
        Thread.sleep(100*1000);

        System.out.println("Shutting down listeners");
View Full Code Here


        arguments.put("x-match", "all");
        arguments.put("h1", "v1");
        arguments.put("h2", "v2");
        session.exchangeBind("headers_queue_all", "test.headers", "useless", arguments);
        // confirm completion
        session.sync();
        //cleanup
        session.close();
        con.close();
    }
}
View Full Code Here

        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();

        //cleanup
        session.close();
        con.close();
    }
View Full Code Here

        // XXX
        session.messageFlow("listener_destination", MessageCreditUnit.BYTE, Session.UNLIMITED_CREDIT);
        session.messageFlow("listener_destination", MessageCreditUnit.MESSAGE, 11);

        // confirm completion
        session.sync();

        // check to see if we have received all the messages
        System.out.println("Waiting 100 seconds for messages from listener_destination");
        Thread.sleep(100*1000);
        System.out.println("Shutting down listener for listener_destination");
View Full Code Here

        // XXX
        session.messageFlow("listener_destination", MessageCreditUnit.BYTE, Session.UNLIMITED_CREDIT);
        session.messageFlow("listener_destination", MessageCreditUnit.MESSAGE, 11);

        // confirm completion
        session.sync();

        // wait to receive all the messages
        System.out.println("Waiting 100 seconds for messages from listener_destination");
        Thread.sleep(100*1000);
        System.out.println("Shutting down listener for listener_destination");
View Full Code Here

        // XXX
        session.messageFlow("listener_destination", MessageCreditUnit.BYTE, Session.UNLIMITED_CREDIT);
        session.messageFlow("listener_destination", MessageCreditUnit.MESSAGE, 11);

        // confirm completion
        session.sync();

        // wait to receive all the messages
        System.out.println("Waiting 100 seconds for messages from listener_destination");

        _countDownLatch.await(30, TimeUnit.SECONDS);
View Full Code Here

            }
            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();       
    }

    private Destination getDestination(String exch, String routkey, String qname)
            throws Exception
View Full Code Here

            }
            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();       
    }

    private Destination getDestination(String exch, String routkey, String qname)
            throws Exception
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.