@Bean public RedeliveryPolicy osgpResponsesRedeliveryPolicy() { final RedeliveryPolicy redeliveryPolicy = new RedeliveryPolicy(); redeliveryPolicy.setInitialRedeliveryDelay( Long.parseLong( this.environment.getRequiredProperty( PROPERTY_NAME_JMS_OSGP_RESPONSES_INITIAL_REDELIVERY_DELAY))); redeliveryPolicy.setMaximumRedeliveries( Integer.parseInt( this.environment.getRequiredProperty( PROPERTY_NAME_JMS_OSGP_RESPONSES_MAXIMUM_REDELIVERIES))); redeliveryPolicy.setMaximumRedeliveryDelay( Long.parseLong( this.environment.getRequiredProperty( PROPERTY_NAME_JMS_OSGP_RESPONSES_MAXIMUM_REDELIVERY_DELAY))); redeliveryPolicy.setRedeliveryDelay( Long.parseLong( this.environment.getRequiredProperty( PROPERTY_NAME_JMS_OSGP_RESPONSES_REDELIVERY_DELAY))); redeliveryPolicy.setDestination(this.dlmsRequestsQueue()); redeliveryPolicy.setBackOffMultiplier( Double.parseDouble( this.environment.getRequiredProperty( PROPERTY_NAME_JMS_OSGP_RESPONSES_BACK_OFF_MULTIPLIER))); redeliveryPolicy.setUseExponentialBackOff( Boolean.parseBoolean( this.environment.getRequiredProperty( PROPERTY_NAME_JMS_OSGP_RESPONSES_USE_EXPONENTIAL_BACK_OFF))); return redeliveryPolicy; }
@Bean(name = "domainAdminIncomingOsgpCoreRequestsRedeliveryPolicy") public RedeliveryPolicy incomingOsgpCoreRequestsRedeliveryPolicy() { final RedeliveryPolicy redeliveryPolicy = new RedeliveryPolicy(); redeliveryPolicy.setInitialRedeliveryDelay( Long.parseLong( this.environment.getRequiredProperty( PROPERTY_NAME_JMS_INCOMING_OSGP_CORE_REQUESTS_INITIAL_REDELIVERY_DELAY))); redeliveryPolicy.setMaximumRedeliveries( Integer.parseInt( this.environment.getRequiredProperty( PROPERTY_NAME_JMS_INCOMING_OSGP_CORE_REQUESTS_MAXIMUM_REDELIVERIES))); redeliveryPolicy.setMaximumRedeliveryDelay( Long.parseLong( this.environment.getRequiredProperty( PROPERTY_NAME_JMS_INCOMING_OSGP_CORE_REQUESTS_MAXIMUM_REDELIVERY_DELAY))); redeliveryPolicy.setRedeliveryDelay( Long.parseLong( this.environment.getRequiredProperty( PROPERTY_NAME_JMS_INCOMING_OSGP_CORE_REQUESTS_REDELIVERY_DELAY))); redeliveryPolicy.setDestination(this.incomingOsgpCoreRequestsQueue()); redeliveryPolicy.setBackOffMultiplier( Double.parseDouble( this.environment.getRequiredProperty( PROPERTY_NAME_JMS_INCOMING_OSGP_CORE_REQUESTS_BACK_OFF_MULTIPLIER))); redeliveryPolicy.setUseExponentialBackOff( Boolean.parseBoolean( this.environment.getRequiredProperty( PROPERTY_NAME_JMS_INCOMING_OSGP_CORE_REQUESTS_USE_EXPONENTIAL_BACK_OFF))); return redeliveryPolicy; }