|
14 | 14 | import com.studiomediatech.queryresponse.QueryResponseTopicExchange;
|
15 | 15 |
|
16 | 16 | /**
|
17 |
| - * Configuration for ports that enable messaging, specifically AMQP including |
18 |
| - * Query/Response. |
| 17 | + * Configuration for ports that enable messaging, specifically AMQP including Query/Response. |
19 | 18 | */
|
20 | 19 | @Configuration
|
21 | 20 | @EnableQueryResponse
|
22 | 21 | @ComponentScan(basePackageClasses = MessagingConfig.class)
|
23 | 22 | public class MessagingConfig {
|
24 | 23 |
|
25 |
| - static final String QUERY_RESPONSE_STATS_QUEUE_BEAN = "queryResponseStatsQueue"; |
26 |
| - static final String QUERY_RESPONSE_QUERIES_QUEUE_BEAN = "queryResponseQueriesQueue"; |
27 |
| - |
28 |
| - protected static final String QUERY_RESPONSE_STATS_BINDING = "queryResponseStatsBinding"; |
29 |
| - protected static final String QUERY_RESPONSE_TELEMETRY_BINDING = "queryResponseTelemetryBinding"; |
30 |
| - |
31 |
| - @Bean |
32 |
| - ConnectionNameStrategy connectionNameStrategy(Environment env) { |
33 |
| - return connectionFactory -> env.getProperty("spring.application.name", "query-response-ui"); |
34 |
| - } |
35 |
| - |
36 |
| - @Bean(QUERY_RESPONSE_STATS_QUEUE_BEAN) |
37 |
| - Queue queryResponseStatsQueue() { |
38 |
| - return new AnonymousQueue(); |
39 |
| - } |
40 |
| - |
41 |
| - @Bean(QUERY_RESPONSE_STATS_BINDING) |
42 |
| - Binding queryResponseStatsQueueBinding(QueryResponseTopicExchange queryResponseTopicExchange) { |
43 |
| - return BindingBuilder.bind(queryResponseStatsQueue()).to(queryResponseTopicExchange) |
44 |
| - .with("query-response/internal/stats"); |
45 |
| - } |
46 |
| - |
47 |
| - @Bean(QUERY_RESPONSE_TELEMETRY_BINDING) |
48 |
| - Binding queryResponseTelemetryQueueBinding(QueryResponseTopicExchange queryResponseTopicExchange) { |
49 |
| - return BindingBuilder.bind(queryResponseStatsQueue()).to(queryResponseTopicExchange) |
50 |
| - .with("query-response/internal/telemetry"); |
51 |
| - } |
| 24 | + static final String QUERY_RESPONSE_STATS_QUEUE_BEAN = "queryResponseStatsQueue"; |
| 25 | + static final String QUERY_RESPONSE_QUERIES_QUEUE_BEAN = "queryResponseQueriesQueue"; |
| 26 | + |
| 27 | + protected static final String QUERY_RESPONSE_STATS_BINDING = "queryResponseStatsBinding"; |
| 28 | + protected static final String QUERY_RESPONSE_TELEMETRY_BINDING = "queryResponseTelemetryBinding"; |
| 29 | + |
| 30 | + @Bean |
| 31 | + ConnectionNameStrategy connectionNameStrategy(Environment env) { |
| 32 | + return connectionFactory -> env.getProperty("spring.application.name", "query-response-ui"); |
| 33 | + } |
| 34 | + |
| 35 | + @Bean(QUERY_RESPONSE_STATS_QUEUE_BEAN) |
| 36 | + Queue queryResponseStatsQueue() { |
| 37 | + return new AnonymousQueue(); |
| 38 | + } |
| 39 | + |
| 40 | + @Bean(QUERY_RESPONSE_STATS_BINDING) |
| 41 | + Binding queryResponseStatsQueueBinding(QueryResponseTopicExchange queryResponseTopicExchange) { |
| 42 | + return BindingBuilder.bind(queryResponseStatsQueue()).to(queryResponseTopicExchange) |
| 43 | + .with("query-response/internal/stats"); |
| 44 | + } |
| 45 | + |
| 46 | + @Bean(QUERY_RESPONSE_TELEMETRY_BINDING) |
| 47 | + Binding queryResponseTelemetryQueueBinding(QueryResponseTopicExchange queryResponseTopicExchange) { |
| 48 | + return BindingBuilder.bind(queryResponseStatsQueue()).to(queryResponseTopicExchange) |
| 49 | + .with("query-response/internal/telemetry"); |
| 50 | + } |
52 | 51 | }
|
0 commit comments