Inject RedeliveryPolicy to Spring boot ActiveMQ -


i'm using spring-boot-starter-activemq poolfactory. works great , it's easy configure via application.yaml, cannot find correct way inject custom redeliverypolicy. question how can that?

the re-delivery policy can set on connection factory. connection factory configured automatically spring boot, can add method set it.

import org.apache.activemq.activemqconnectionfactory; import org.apache.activemq.redeliverypolicy; import org.springframework.beans.factory.initializingbean; import org.springframework.context.annotation.bean; import org.springframework.context.annotation.configuration;  @configuration public class foo {     @bean     public initializingbean connectionfactory(activemqconnectionfactory connectionfactory)     {         return () ->         {             redeliverypolicy redeliverypolicy = new redeliverypolicy();             // configure redelivery policy             connectionfactory.setredeliverypolicy(redeliverypolicy);         };     } } 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -