Skip to content

Commit

Permalink
Set time out in RabbitMq async rabbit template
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewhorridge committed Jun 17, 2024
1 parent 68368b3 commit 79e310f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ public RabbitTemplate rabbitTemplate(ConnectionFactory connectionFactory) {
@Bean(name = "asyncRabbitTemplate")
@ConditionalOnProperty(prefix = "webprotege.rabbitmq", name = "commands-subscribe", havingValue = "true", matchIfMissing = true)
public AsyncRabbitTemplate asyncRabbitTemplate(@Qualifier("rabbitTemplate") RabbitTemplate rabbitTemplate, SimpleMessageListenerContainer replyListenerContainer) {
return new AsyncRabbitTemplate(rabbitTemplate, replyListenerContainer, getCommandResponseQueue());
var asyncRabbitTemplate = new AsyncRabbitTemplate(rabbitTemplate,
replyListenerContainer,
getCommandResponseQueue());
asyncRabbitTemplate.setReceiveTimeout(rabbitMqTimeout);
return asyncRabbitTemplate;
}


Expand Down

0 comments on commit 79e310f

Please sign in to comment.