Skip to content

Commit

Permalink
Merge pull request #5 from protegeproject/fix-set-timeout-on-asyncrab…
Browse files Browse the repository at this point in the history
…bittemplate

Set time out in RabbitMq async rabbit template
  • Loading branch information
matthewhorridge authored Jun 17, 2024
2 parents 68368b3 + 79e310f commit 250cd37
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 250cd37

Please sign in to comment.