This repository was archived by the owner on Dec 5, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
java/works/weave/socks/shipping/configuration Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 77import org .springframework .amqp .rabbit .core .RabbitTemplate ;
88import org .springframework .amqp .support .converter .Jackson2JsonMessageConverter ;
99import org .springframework .amqp .support .converter .MessageConverter ;
10+ import org .springframework .beans .factory .annotation .Value ;
1011import org .springframework .context .annotation .Bean ;
1112import org .springframework .context .annotation .Configuration ;
1213
14+
1315@ Configuration
1416public class RabbitMqConfiguration {
17+
1518 final static String queueName = "shipping-task" ;
1619
20+ @ Value ("${spring.rabbitmq.host}" )
21+ private String host ;
22+
1723 @ Bean
1824 public ConnectionFactory connectionFactory () {
19- CachingConnectionFactory connectionFactory = new CachingConnectionFactory ("rabbitmq" );
25+ CachingConnectionFactory connectionFactory = new CachingConnectionFactory (host );
2026 connectionFactory .setCloseTimeout (5000 );
2127 connectionFactory .setConnectionTimeout (5000 );
2228 connectionFactory .setUsername ("guest" );
Original file line number Diff line number Diff line change 11server.port =${port:8080}
2+ spring.rabbitmq.host =rabbitmq
23endpoints.health.enabled =false
34spring.zipkin.baseUrl =http://${zipkin:zipkin}:9411/
45spring.sleuth.sampler.percentage =1.0
You can’t perform that action at this time.
0 commit comments