Example usage for javax.jms BytesMessage setJMSReplyTo

List of usage examples for javax.jms BytesMessage setJMSReplyTo

Introduction

In this page you can find the example usage for javax.jms BytesMessage setJMSReplyTo.

Prototype


void setJMSReplyTo(Destination replyTo) throws JMSException;

Source Link

Document

Sets the Destination object to which a reply to this message should be sent.

Usage

From source file:com.datatorrent.lib.io.jms.JMSObjectInputOperatorTest.java

private void createByteMsgs(int numMessages) throws Exception {
    BytesMessage message = testMeta.session.createBytesMessage();
    for (int i = 0; i < numMessages; i++) {
        message.writeBytes(("Message: " + i).getBytes());
        message.setIntProperty("counter", i);
        message.setJMSCorrelationID("MyCorrelationID");
        message.setJMSReplyTo(new ActiveMQQueue("MyReplyTo"));
        message.setJMSType("MyType");
        message.setJMSPriority(5);/*from w ww  .  j av a2  s . c  om*/
        testMeta.producer.send(message);
    }
}