Examples of messageTransfer()


Examples of org.apache.qpid.nclient.MessagePartListener.messageTransfer()

    // --------------------------------------------
    @Override public void messageTransfer(Session session, MessageTransfer xfr)
    {
        MessagePartListener listener = ((ClientSession)session).getMessageListeners()
            .get(xfr.getDestination());
        listener.messageTransfer(xfr);
    }

    @Override public void messageReject(Session session, MessageReject struct)
    {
        for (Range range : struct.getTransfers())
View Full Code Here

Examples of org.apache.qpid.nclient.Session.messageTransfer()

        DeliveryProperties deliveryProps = new DeliveryProperties();
        deliveryProps.setRoutingKey("routing_key");

        for (int i=0; i<10; i++)
        {
            session.messageTransfer("amq.fanout", MessageAcceptMode.EXPLICIT, MessageAcquireMode.PRE_ACQUIRED,
                                    new Header(deliveryProps), "Message " + i);
        }

        session.messageTransfer("amq.fanout", MessageAcceptMode.EXPLICIT, MessageAcquireMode.PRE_ACQUIRED,
                                new Header(deliveryProps),
View Full Code Here

Examples of org.apache.qpid.nclient.Session.messageTransfer()

        {
            session.messageTransfer("amq.fanout", MessageAcceptMode.EXPLICIT, MessageAcquireMode.PRE_ACQUIRED,
                                    new Header(deliveryProps), "Message " + i);
        }

        session.messageTransfer("amq.fanout", MessageAcceptMode.EXPLICIT, MessageAcquireMode.PRE_ACQUIRED,
                                new Header(deliveryProps),
                                "That's all, folks!");

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

Examples of org.apache.qpid.nclient.Session.messageTransfer()

        DeliveryProperties deliveryProps = new DeliveryProperties();
        deliveryProps.setRoutingKey("routing_key");

        for (int i=0; i<10; i++)
        {
            session.messageTransfer("amq.direct", MessageAcceptMode.EXPLICIT,MessageAcquireMode.PRE_ACQUIRED,
                                    new Header(deliveryProps),
                                    "Message " + i);
        }

        session.messageTransfer("amq.direct", MessageAcceptMode.EXPLICIT, MessageAcquireMode.PRE_ACQUIRED,
View Full Code Here

Examples of org.apache.qpid.nclient.Session.messageTransfer()

            session.messageTransfer("amq.direct", MessageAcceptMode.EXPLICIT,MessageAcquireMode.PRE_ACQUIRED,
                                    new Header(deliveryProps),
                                    "Message " + i);
        }

        session.messageTransfer("amq.direct", MessageAcceptMode.EXPLICIT, MessageAcquireMode.PRE_ACQUIRED,
                                new Header(deliveryProps),
                                "That's all, folks!");

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

Examples of org.apache.qpid.nclient.Session.messageTransfer()

        ssn.sync();

        ssn.messageSubscribe("queue1", "myDest", (short)0, (short)0,createAdapter(), null);

        // queue
        ssn.messageTransfer("amq.direct", MessageAcceptMode.NONE, MessageAcquireMode.PRE_ACQUIRED,
                            new Header(new DeliveryProperties().setRoutingKey("queue1"),
                                       new MessageProperties().setMessageId(UUID.randomUUID())),
                            ByteBuffer.wrap("this is the data".getBytes()));

        //reject
View Full Code Here

Examples of org.apache.qpid.nclient.Session.messageTransfer()

                            new Header(new DeliveryProperties().setRoutingKey("queue1"),
                                       new MessageProperties().setMessageId(UUID.randomUUID())),
                            ByteBuffer.wrap("this is the data".getBytes()));

        //reject
        ssn.messageTransfer("amq.direct", MessageAcceptMode.NONE, MessageAcquireMode.PRE_ACQUIRED,
                            new Header(new DeliveryProperties().setRoutingKey("stocks")),
                            ByteBuffer.wrap("this should be rejected".getBytes()));
        ssn.sync();

        // topic subs
View Full Code Here

Examples of org.apache.qpid.nclient.Session.messageTransfer()

        ssn.queueDeclare("topic3", null, null);
        ssn.exchangeBind("topic3", "amq.topic", "stock.us.rh",null);
        ssn.sync();

        // topic
        ssn.messageTransfer("amq.topic", MessageAcceptMode.NONE, MessageAcquireMode.PRE_ACQUIRED,
                            new Header(new DeliveryProperties().setRoutingKey("stock.us.ibm"),
                                       new MessageProperties().setMessageId(UUID.randomUUID())),
                            ByteBuffer.wrap("Topic message".getBytes()));
    }
View Full Code Here

Examples of org.apache.qpid.nclient.util.MessagePartListenerAdapter.messageTransfer()

        {
            LOGGER.error("unhandled message: %s", xfr);
        }
        else
        {
            l.messageTransfer(xfr);
        }
    }

   
    public void exception(Session ssn, SessionException exc)
View Full Code Here

Examples of org.apache.qpid.nclient.util.MessagePartListenerAdapter.messageTransfer()

        {
            LOGGER.error("unhandled message: %s", xfr);
        }
        else
        {
            l.messageTransfer(xfr);
        }
    }

   
    public void exception(Session ssn, SessionException exc)
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.