Skip to content

Commit 1ca3cbf

Browse files
2.x Use waitlist queue name as routing key (#461)
1 parent 8e29658 commit 1ca3cbf

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/main/java/com/ericsson/ei/handlers/RmqHandler.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@ public class RmqHandler {
122122
@JsonIgnore
123123
private SimpleMessageListenerContainer container;
124124

125-
private static final String WAITLIST_BINDING_KEY = "eiffel-intelligence.waitlist";
126-
127125
@Bean
128126
public ConnectionFactory connectionFactory() {
129127
cachingConnectionFactory = new CachingConnectionFactory(host, port);
@@ -169,7 +167,7 @@ public TopicExchange exchange() {
169167

170168
@Bean
171169
Binding binding() {
172-
return BindingBuilder.bind(internalQueue()).to(exchange()).with(WAITLIST_BINDING_KEY);
170+
return BindingBuilder.bind(internalQueue()).to(exchange()).with(getWaitlistQueueName());
173171
}
174172

175173
@Bean
@@ -213,7 +211,7 @@ public RabbitTemplate rabbitMqTemplate() {
213211

214212
rabbitTemplate.setExchange(exchangeName);
215213
rabbitTemplate.setQueue(getWaitlistQueueName());
216-
rabbitTemplate.setRoutingKey(WAITLIST_BINDING_KEY);
214+
rabbitTemplate.setRoutingKey(getWaitlistQueueName());
217215
rabbitTemplate.setConfirmCallback(new ConfirmCallback() {
218216
@Override
219217
public void confirm(CorrelationData correlationData, boolean ack, String cause) {

wiki/markdown/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ An internal waitlist queue is also created that uses all of the previously menti
153153
attaches the rabbitmq.waitlist.queue.suffix property at the end of the name.
154154
This queue does not get the routing key bindings from the rabbitmq.binding.key property and is only meant for
155155
sending and consuming messages by Eiffel Intelligence.
156-
It instead uses the non-configurable routing key "eiffel-intelligence.waitlist".
156+
It instead uses the full name of the waitlist queue as a routing key.
157157
The rabbitmq.tlsVersion property specifies the security protocol and you can find valid names
158158
[here](https://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#SSLContext)
159159

0 commit comments

Comments
 (0)