Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
eolivelli committed May 6, 2024
1 parent 614a381 commit 5de1f8b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,15 @@ public static void main(String[] args) throws Exception
try (JMSConsumer consumer = jmsContext.createConsumer(topic1, null);){
}

int numMessages = 10000;
int numMessages = 20000;
for (int i = 0; i < numMessages; i++) {
JMSProducer producer = jmsContext.createProducer();
if (i % 2 == 0) {
producer.setPriority(0);
} else {
producer.setPriority(9);
}
producer.setPriority(i % 10);
String text = "text-"+i+"-"+producer.getPriority();
producer.send(topic1, text);
//System.out.println("Sent message "+ i + " with priority: " + producer.getPriority() + " and body: " + text);
Expand All @@ -79,6 +80,9 @@ public static void main(String[] args) throws Exception
}
}

// give time to Prom to see the backlog
Thread.sleep(60000);

int lastPrio = -1;
int groupSize = 0;
try (JMSConsumer consumer = jmsContext.createConsumer(topic1, null);) {
Expand Down

0 comments on commit 5de1f8b

Please sign in to comment.