Skip to content

Commit

Permalink
Set rabbit queues to noWait to prevent communication errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dylan-mulligan committed Nov 28, 2023
1 parent 641cb59 commit d25d2b1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions productnameextractor/src/main/java/messenger/Messenger.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,13 @@ public void run() {
Connection connection = factory.newConnection();
Channel channel = connection.createChannel();

// TODO: Needed?
channel.queueDeclare(inputQueue, true, false, false, null);
channel.queueDeclare(patchFinderOutputQueue, true, false, false, null);
channel.queueDeclare(fixFinderOutputQueue, true, false, false, null);
channel.queueDeclareNoWait(inputQueue, true, false, false, null);
channel.queueDeclareNoWait(patchFinderOutputQueue, true, false, false, null);
channel.queueDeclareNoWait(fixFinderOutputQueue, true, false, false, null);
// TODO: Remove when queue issue is resolved (errors thrown likely when producer does not receive info from consumer)
// channel.queueDeclare(inputQueue, true, false, false, null);
// channel.queueDeclare(patchFinderOutputQueue, true, false, false, null);
// channel.queueDeclare(fixFinderOutputQueue, true, false, false, null);

channel.basicConsume(inputQueue, false, new DefaultConsumer(channel) {
@Override
Expand Down

0 comments on commit d25d2b1

Please sign in to comment.