Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Hilbrand committed Jan 9, 2025
1 parent 60487e2 commit f1f41fc
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 14 deletions.
4 changes: 2 additions & 2 deletions source/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Builder part for maven packaging.
FROM maven:3-openjdk-11 as builder
FROM maven:3-openjdk-17 as builder

WORKDIR /app

Expand All @@ -13,7 +13,7 @@ RUN mv -v "$(ls taskmanager/target/taskmanager-*.jar | grep -v -e '-javadoc' -e
&& mvn clean

# Final image containing only the application
FROM openjdk:11-jre-buster
FROM eclipse-temurin:17

# Set up a non root account to run containers as
RUN groupadd -r taskmanager \
Expand Down
2 changes: 0 additions & 2 deletions source/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@
</scm>

<properties>
<java.version>11</java.version>

<spotless.version>2.28.0</spotless.version>
<dropwizard.metrics.version>4.2.13</dropwizard.metrics.version>
<slf4j.version>2.0.5</slf4j.version>
Expand Down
4 changes: 4 additions & 0 deletions source/taskmanager-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
<name>Taskmanager :: Client Library</name>
<description>The Library for Taskmanager Client code</description>

<properties>
<java.version>11</java.version>
</properties>

<dependencies>
<!-- RabbitMQ -->
<dependency>
Expand Down
4 changes: 0 additions & 4 deletions source/taskmanager/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
<name>Taskmanager :: Application</name>
<description>AERIUS Taskmanager actual manager/scheduler (standalone)</description>

<properties>
<java.version>17</java.version>
</properties>

<dependencies>
<dependency>
<groupId>nl.aerius</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static Map<String, Object> queueDeclareArguments(final boolean durable, f
if (queueType == null) {
return Map.of();
}
final RabbitMQQueueType actualType = durable && PERSISTENT_QUEUE_TYPES.contains(queueType) ? RabbitMQQueueType.CLASSIC : queueType;
final RabbitMQQueueType actualType = !durable && PERSISTENT_QUEUE_TYPES.contains(queueType) ? RabbitMQQueueType.CLASSIC : queueType;

return Map.of(ARG_QUEUE_TYPE, actualType.type());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@ void testQueueDeclareArguments(final boolean durable, final RabbitMQQueueType in
private static List<Arguments> combinations() {
return List.of(
Arguments.of(false, RabbitMQQueueType.CLASSIC, RabbitMQQueueType.CLASSIC),
Arguments.of(false, RabbitMQQueueType.QUORUM, RabbitMQQueueType.QUORUM),
Arguments.of(false, RabbitMQQueueType.STREAM, RabbitMQQueueType.STREAM),
// when durable is false always return classic because only queue type compatible with non-durable
Arguments.of(false, RabbitMQQueueType.QUORUM, RabbitMQQueueType.CLASSIC),
Arguments.of(false, RabbitMQQueueType.STREAM, RabbitMQQueueType.CLASSIC),

Arguments.of(true, RabbitMQQueueType.CLASSIC, RabbitMQQueueType.CLASSIC),
// when durable is true always return classic because only queue type compatible with classic
Arguments.of(true, RabbitMQQueueType.QUORUM, RabbitMQQueueType.CLASSIC),
Arguments.of(true, RabbitMQQueueType.STREAM, RabbitMQQueueType.CLASSIC)
Arguments.of(true, RabbitMQQueueType.QUORUM, RabbitMQQueueType.QUORUM),
Arguments.of(true, RabbitMQQueueType.STREAM, RabbitMQQueueType.STREAM)
);
}
}

0 comments on commit f1f41fc

Please sign in to comment.