aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/forward/AmqpClient.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/forward/AmqpClient.java b/src/main/java/org/traccar/forward/AmqpClient.java
index 302aa664c..361cfffee 100644
--- a/src/main/java/org/traccar/forward/AmqpClient.java
+++ b/src/main/java/org/traccar/forward/AmqpClient.java
@@ -43,7 +43,8 @@ public class AmqpClient {
throw new RuntimeException("Error while setting URI for RabbitMQ connection factory", e);
}
- try (Connection connection = factory.newConnection()) {
+ try {
+ Connection connection = factory.newConnection();
channel = connection.createChannel();
channel.exchangeDeclare(exchange, BuiltinExchangeType.TOPIC, true);
} catch (IOException | TimeoutException e) {