private Map<String, Object> populateQueueArgumentsFromDeadLetterExchange( final Map<String, Object> queueArgs) { if (endpoint.getDeadLetterExchange() != null) { queueArgs.put( RabbitMQConstants.RABBITMQ_DEAD_LETTER_EXCHANGE, endpoint.getDeadLetterExchange()); queueArgs.put( RabbitMQConstants.RABBITMQ_DEAD_LETTER_ROUTING_KEY, endpoint.getDeadLetterRoutingKey()); } return queueArgs; }
private void declareAndBindDeadLetterExchangeWithQueue(final Channel channel) throws IOException { if (endpoint.getDeadLetterExchange() != null) { // TODO Do we need to setup the args for the DeadLetter? declareExchange( channel, endpoint.getDeadLetterExchange(), endpoint.getDeadLetterExchangeType(), Collections.<String, Object>emptyMap()); declareAndBindQueue( channel, endpoint.getDeadLetterQueue(), endpoint.getDeadLetterExchange(), endpoint.getDeadLetterRoutingKey(), null); } }