Example usage for org.springframework.jms.listener.adapter JmsResponse forQueue

List of usage examples for org.springframework.jms.listener.adapter JmsResponse forQueue

Introduction

In this page you can find the example usage for org.springframework.jms.listener.adapter JmsResponse forQueue.

Prototype

public static <T> JmsResponse<T> forQueue(T result, String queueName) 

Source Link

Document

Create a JmsResponse targeting the queue with the specified name.

Usage

From source file:jms001.ExampleListener.java

@JmsListener(destination = "INBOUND")
public JmsResponse inbound(Message message, Session s) throws JMSException {
    String dst = "D" + (1 + counter.incrementAndGet() % 3);
    System.out.println("sent to: " + dst);
    return JmsResponse.forQueue(s.createTextMessage("What a beautiful world!"), dst);
}