Search in sources :

Example 6 with RabbitTemplate

use of org.springframework.amqp.rabbit.core.RabbitTemplate in project fru-paqx-parent by dellemc-symphony.

the class RabbitConfig method rabbitTemplate.

@Bean
RabbitTemplate rabbitTemplate() {
    RabbitTemplate template = new RabbitTemplate(rabbitConnectionFactory);
    template.setMessageConverter(messageConverter());
    template.setRetryTemplate(retryTemplate());
    return template;
}
Also used : RabbitTemplate(org.springframework.amqp.rabbit.core.RabbitTemplate) Bean(org.springframework.context.annotation.Bean)

Example 7 with RabbitTemplate

use of org.springframework.amqp.rabbit.core.RabbitTemplate in project av-service by dvoraka.

the class AmqpBridgeOutputConfig method outRabbitTemplate.

@Bean
public RabbitTemplate outRabbitTemplate(ConnectionFactory outConnectionFactory, MessageConverter outMessageConverter) {
    RabbitTemplate template = new RabbitTemplate(outConnectionFactory);
    template.setReceiveTimeout(listeningTimeout);
    template.setQueue(resultQueue);
    template.setMessageConverter(outMessageConverter);
    return template;
}
Also used : RabbitTemplate(org.springframework.amqp.rabbit.core.RabbitTemplate) Bean(org.springframework.context.annotation.Bean)

Example 8 with RabbitTemplate

use of org.springframework.amqp.rabbit.core.RabbitTemplate in project av-service by dvoraka.

the class AmqpServerConfig method fileServerRabbitTemplate.

@Bean
public RabbitTemplate fileServerRabbitTemplate(ConnectionFactory serverConnectionFactory, MessageConverter fileServerMessageConverter) {
    RabbitTemplate template = new RabbitTemplate(serverConnectionFactory);
    template.setReceiveTimeout(listeningTimeout);
    template.setMessageConverter(fileServerMessageConverter);
    return template;
}
Also used : RabbitTemplate(org.springframework.amqp.rabbit.core.RabbitTemplate) Bean(org.springframework.context.annotation.Bean)

Example 9 with RabbitTemplate

use of org.springframework.amqp.rabbit.core.RabbitTemplate in project av-service by dvoraka.

the class AmqpReplicationClientConfig method replicationRabbitTemplate.

@Bean
public RabbitTemplate replicationRabbitTemplate(ConnectionFactory connectionFactory, MessageConverter replicationMessageConverter) {
    RabbitTemplate template = new RabbitTemplate(connectionFactory);
    template.setReceiveTimeout(listeningTimeout);
    template.setExchange(replicationExchange);
    template.setMessageConverter(replicationMessageConverter);
    return template;
}
Also used : RabbitTemplate(org.springframework.amqp.rabbit.core.RabbitTemplate) Bean(org.springframework.context.annotation.Bean)

Example 10 with RabbitTemplate

use of org.springframework.amqp.rabbit.core.RabbitTemplate in project av-service by dvoraka.

the class AmqpTestReplicationClientConfig method replicationRabbitTemplate.

@Bean
public RabbitTemplate replicationRabbitTemplate(ConnectionFactory connectionFactory, MessageConverter replicationMessageConverter) {
    RabbitTemplate template = new RabbitTemplate(connectionFactory);
    template.setReceiveTimeout(listeningTimeout);
    template.setExchange(replicationExchange);
    template.setMessageConverter(replicationMessageConverter);
    return template;
}
Also used : RabbitTemplate(org.springframework.amqp.rabbit.core.RabbitTemplate) Bean(org.springframework.context.annotation.Bean)

Aggregations

RabbitTemplate (org.springframework.amqp.rabbit.core.RabbitTemplate)14 Test (org.junit.Test)8 Bean (org.springframework.context.annotation.Bean)6 DirectFieldAccessor (org.springframework.beans.DirectFieldAccessor)4 CachingConnectionFactory (org.springframework.amqp.rabbit.connection.CachingConnectionFactory)3 RabbitAdmin (org.springframework.amqp.rabbit.core.RabbitAdmin)1 RabbitMessagingTemplate (org.springframework.amqp.rabbit.core.RabbitMessagingTemplate)1 ExponentialBackOffPolicy (org.springframework.retry.backoff.ExponentialBackOffPolicy)1 SimpleRetryPolicy (org.springframework.retry.policy.SimpleRetryPolicy)1 RetryTemplate (org.springframework.retry.support.RetryTemplate)1