|
|
@ -1,5 +1,5 @@
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Copyright 2012-2017 the original author or authors.
|
|
|
|
* Copyright 2012-2018 the original author or authors.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
@ -70,29 +70,22 @@ class ArtemisEmbeddedConfigurationFactory {
|
|
|
|
+ this.properties.getClusterPassword());
|
|
|
|
+ this.properties.getClusterPassword());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
configuration.setClusterPassword(this.properties.getClusterPassword());
|
|
|
|
configuration.setClusterPassword(this.properties.getClusterPassword());
|
|
|
|
|
|
|
|
configuration.addAddressConfiguration(createAddressConfiguration("DLQ"));
|
|
|
|
|
|
|
|
configuration.addAddressConfiguration(createAddressConfiguration("ExpiryQueue"));
|
|
|
|
configuration.addAddressesSetting("#",
|
|
|
|
configuration.addAddressesSetting("#",
|
|
|
|
new AddressSettings()
|
|
|
|
new AddressSettings()
|
|
|
|
.setDeadLetterAddress(SimpleString.toSimpleString("DLQ"))
|
|
|
|
.setDeadLetterAddress(SimpleString.toSimpleString("DLQ"))
|
|
|
|
.setExpiryAddress(SimpleString.toSimpleString("ExpiryQueue")));
|
|
|
|
.setExpiryAddress(SimpleString.toSimpleString("ExpiryQueue")));
|
|
|
|
configuration.addAddressConfiguration(
|
|
|
|
|
|
|
|
new CoreAddressConfiguration()
|
|
|
|
|
|
|
|
.setName("DLQ")
|
|
|
|
|
|
|
|
.addRoutingType(RoutingType.ANYCAST)
|
|
|
|
|
|
|
|
.addQueueConfiguration(
|
|
|
|
|
|
|
|
new CoreQueueConfiguration()
|
|
|
|
|
|
|
|
.setName("DLQ")
|
|
|
|
|
|
|
|
.setRoutingType(RoutingType.ANYCAST)));
|
|
|
|
|
|
|
|
configuration.addAddressConfiguration(
|
|
|
|
|
|
|
|
new CoreAddressConfiguration()
|
|
|
|
|
|
|
|
.setName("ExpiryQueue")
|
|
|
|
|
|
|
|
.addRoutingType(RoutingType.ANYCAST)
|
|
|
|
|
|
|
|
.addQueueConfiguration(
|
|
|
|
|
|
|
|
new CoreQueueConfiguration()
|
|
|
|
|
|
|
|
.setName("ExpiryQueue")
|
|
|
|
|
|
|
|
.setRoutingType(RoutingType.ANYCAST)));
|
|
|
|
|
|
|
|
return configuration;
|
|
|
|
return configuration;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private CoreAddressConfiguration createAddressConfiguration(String name) {
|
|
|
|
|
|
|
|
return new CoreAddressConfiguration().setName(name)
|
|
|
|
|
|
|
|
.addRoutingType(RoutingType.ANYCAST)
|
|
|
|
|
|
|
|
.addQueueConfiguration(new CoreQueueConfiguration().setName(name)
|
|
|
|
|
|
|
|
.setRoutingType(RoutingType.ANYCAST));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private String getDataDir() {
|
|
|
|
private String getDataDir() {
|
|
|
|
if (this.properties.getDataDirectory() != null) {
|
|
|
|
if (this.properties.getDataDirectory() != null) {
|
|
|
|
return this.properties.getDataDirectory();
|
|
|
|
return this.properties.getDataDirectory();
|
|
|
|