Skip to content

Commit

Permalink
Added test exchanges
Browse files Browse the repository at this point in the history
  • Loading branch information
a-dubaj committed Mar 31, 2022
1 parent 3f78ae9 commit 32d7595
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.springframework.amqp.core.TopicExchange;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.retry.annotation.Backoff;

@Configuration
public class RabbitMqExchangeConfiguration {
Expand All @@ -21,4 +22,31 @@ Exchange example2exchange() {
.internal()
.build();
}

@Bean
Exchange newExchange() {
return ExchangeBuilder.topicExchange("TopicTestExchange")
.autoDelete()
.durable(true)
.internal()
.build();
}

@Bean
Exchange fanoutExchange(){
return ExchangeBuilder.fanoutExchange("FanoutTestExchange")
.autoDelete()
.durable(false)
.internal()
.build();
}

@Bean
Exchange headersExchange(){
return ExchangeBuilder.headersExchange("HeadersTestExchange")
.internal()
.durable(true)
.ignoreDeclarationExceptions()
.build();
}
}

0 comments on commit 32d7595

Please sign in to comment.