Use default priority value from JMS interface

This commit is contained in:
Ken Liao 2024-10-22 10:59:08 -07:00
parent eecf7b6ead
commit 99d9567278
2 changed files with 6 additions and 2 deletions

View File

@ -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;

View File

@ -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