Merge pull request #10 from bsinno/MECS-1229_REONNECT_QUEUES_TO_VHOST

ok
This commit is contained in:
Kai Zimmermann
2016-01-26 11:25:28 +01:00
2 changed files with 22 additions and 0 deletions

View File

@@ -139,6 +139,7 @@ public class AmqpConfiguration {
final SimpleRabbitListenerContainerFactory containerFactory = new SimpleRabbitListenerContainerFactory();
containerFactory.setDefaultRequeueRejected(false);
containerFactory.setConnectionFactory(connectionFactory);
containerFactory.setMissingQueuesFatal(amqpProperties.isMissingQueuesFatal());
return containerFactory;
}

View File

@@ -8,6 +8,7 @@
*/
package org.eclipse.hawkbit.amqp;
import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
@@ -24,6 +25,26 @@ public class AmqpProperties {
private String deadLetterQueue = "dmf_connector_deadletter";
private String deadLetterExchange = "dmf.connector.deadletter";
private String receiverQueue = "dmf_receiver";
private boolean missingQueuesFatal = false;
/**
* Is missingQueuesFatal enabled
*
* @see SimpleMessageListenerContainer#setMissingQueuesFatal
* @return the missingQueuesFatal <true> enabled <false> disabled
*/
public boolean isMissingQueuesFatal() {
return missingQueuesFatal;
}
/**
* @param missingQueuesFatal
* the missingQueuesFatal to set.
* @see SimpleMessageListenerContainer#setMissingQueuesFatal
*/
public void setMissingQueuesFatal(final boolean missingQueuesFatal) {
this.missingQueuesFatal = missingQueuesFatal;
}
/**
* Returns the dead letter exchange.