Skip to content

Commit 6876f5e

Browse files
3.x Use waitlist queue name as routing key (#462)
* Use waitlist queue name as routing key
1 parent 119c8fd commit 6876f5e

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

src/functionaltests/java/com/ericsson/ei/rabbitmq/connection/RabbitMQTestConnectionSteps.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ private RabbitAdmin createExchange(final RMQHandler rmqHandler) {
145145
admin.getQueueProperties(queueName);
146146
RabbitTemplate rabbitTemplate = admin.getRabbitTemplate();
147147
rabbitTemplate.setExchange(exchangeName);
148-
rabbitTemplate.setRoutingKey(RMQProperties.WAITLIST_BINDING_KEY);
148+
rabbitTemplate.setRoutingKey(rmqProperties.getWaitlistQueueName());
149149
rabbitTemplate.setQueue(queueName);
150150
return admin;
151151
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public RabbitTemplate rabbitMqTemplate() {
122122

123123
rabbitTemplate.setQueue(rmqProperties.getWaitlistQueueName());
124124
rabbitTemplate.setExchange(rmqProperties.getExchangeName());
125-
rabbitTemplate.setRoutingKey(RMQProperties.WAITLIST_BINDING_KEY);
125+
rabbitTemplate.setRoutingKey(rmqProperties.getWaitlistQueueName());
126126
rabbitTemplate.setConfirmCallback(new ConfirmCallback() {
127127
@Override
128128
public void confirm(CorrelationData correlationData, boolean ack, String cause) {
@@ -164,7 +164,7 @@ protected TopicExchange exchange() {
164164

165165
@Bean
166166
protected Binding binding() {
167-
return BindingBuilder.bind(internalQueue()).to(exchange()).with(RMQProperties.WAITLIST_BINDING_KEY);
167+
return BindingBuilder.bind(internalQueue()).to(exchange()).with(rmqProperties.getWaitlistQueueName());
168168
}
169169

170170
@Bean

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ public class RMQProperties {
8888
@Value("${rabbitmq.queue.suffix}")
8989
private String queueSuffix;
9090

91-
public static final String WAITLIST_BINDING_KEY = "eiffel-intelligence.waitlist";
9291

9392
public String getQueueName() {
9493
final String durableName = this.queueDurable ? "durable" : "transient";

wiki/configuration.md

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

0 commit comments

Comments
 (0)