Example usage for org.springframework.amqp.rabbit.core RabbitTemplate setReplyTimeout

List of usage examples for org.springframework.amqp.rabbit.core RabbitTemplate setReplyTimeout

Introduction

In this page you can find the example usage for org.springframework.amqp.rabbit.core RabbitTemplate setReplyTimeout.

Prototype

public void setReplyTimeout(long replyTimeout) 

Source Link

Document

Specify the timeout in milliseconds to be used when waiting for a reply Message when using one of the sendAndReceive methods.

Usage

From source file:com.sample.amqp.RabbitConfiguration.java

@Bean(name = "rabbitTemplate")
public RabbitTemplate rabbitTemplate() {
    RabbitTemplate rabbitTemplate = new RabbitTemplate(connectionFactory());
    rabbitTemplate.setMessageConverter(jsonMessageConverter());
    rabbitTemplate.setReplyQueue(responseQueue());
    rabbitTemplate.setReplyTimeout(60000);
    return rabbitTemplate;
}