diff --git a/activemq-client/src/main/java/org/apache/activemq/util/ProducerThread.java b/activemq-client/src/main/java/org/apache/activemq/util/ProducerThread.java index 447639ac83..f315f5275d 100644 --- a/activemq-client/src/main/java/org/apache/activemq/util/ProducerThread.java +++ b/activemq-client/src/main/java/org/apache/activemq/util/ProducerThread.java @@ -25,6 +25,8 @@ import java.net.URL; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicInteger; +import static jakarta.jms.Message.DEFAULT_PRIORITY; + public class ProducerThread extends Thread { private static final Logger LOG = LoggerFactory.getLogger(ProducerThread.class); @@ -40,7 +42,7 @@ public class ProducerThread extends Thread { long msgTTL = 0L; String msgGroupID=null; int transactionBatchSize; - int priority = 4; + int priority = DEFAULT_PRIORITY; boolean disableMessageTimestamp = false; int transactions = 0; diff --git a/activemq-console/src/main/java/org/apache/activemq/console/command/ProducerCommand.java b/activemq-console/src/main/java/org/apache/activemq/console/command/ProducerCommand.java index 5546610490..79f36842de 100644 --- a/activemq-console/src/main/java/org/apache/activemq/console/command/ProducerCommand.java +++ b/activemq-console/src/main/java/org/apache/activemq/console/command/ProducerCommand.java @@ -27,6 +27,8 @@ import jakarta.jms.Session; import java.util.List; import java.util.concurrent.CountDownLatch; +import static jakarta.jms.Message.DEFAULT_PRIORITY; + public class ProducerCommand extends AbstractCommand { private static final Logger LOG = LoggerFactory.getLogger(ProducerCommand.class); @@ -45,7 +47,7 @@ public class ProducerCommand extends AbstractCommand { String msgGroupID=null; int transactionBatchSize; private int parallelThreads = 1; - int priority = 4; // Default priority + int priority = DEFAULT_PRIORITY; boolean disableMessageTimestamp = false; @Override