List of usage examples for org.springframework.amqp.rabbit.listener AbstractMessageListenerContainer getQueueNames
public String[] getQueueNames()
From source file:org.springframework.amqp.rabbit.AsyncRabbitTemplate.java
/** * Construct an instance using the provided arguments. The first queue the container * is configured to listen to will be used as the reply queue. If 'replyAddress' is * null, replies will be routed using the default exchange with that queue name as the * routing key. Otherwise it should have the form exchange/routingKey and must * cause messages to be routed to the reply queue. * @param template a {@link RabbitTemplate}. * @param container a {@link AbstractMessageListenerContainer}. * @param replyAddress the reply address. */// w w w . j a v a2 s . c o m public AsyncRabbitTemplate(RabbitTemplate template, AbstractMessageListenerContainer container, String replyAddress) { Assert.notNull(template, "'template' cannot be null"); Assert.notNull(container, "'container' cannot be null"); this.template = template; this.container = container; this.container.setMessageListener(this); this.directReplyToContainer = null; if (replyAddress == null) { this.replyAddress = container.getQueueNames()[0]; } else { this.replyAddress = replyAddress; } }