Reputation: 76
I would like to config the max-delivery-attempts
of dead letter as described in the manual.
I tried Spring Boot with embedded ActiveMQ Artemis JMS server, but cannot figure out how to set max-delivery-attempts
value.
Upvotes: 2
Views: 623
Reputation: 76
After debugging the Configuration
instance I finally find the method. Here's the code:
@Configuration
public class RedeliveryConfiguration implements ArtemisConfigurationCustomizer {
@Override
public void customize(org.apache.activemq.artemis.core.config.Configuration configuration) {
Map<String, AddressSettings> addressesSettings = configuration.getAddressesSettings();
// # is the catch all address or default address
addressesSettings.get("#").setMaxDeliveryAttempts(2);
}
}
Upvotes: 3