mirror of
https://github.com/apache/activemq.git
synced 2025-02-17 07:24:51 +00:00
more realistic test with short lived groups rather than single entry
This commit is contained in:
parent
db65c2e027
commit
919099b419
@ -177,9 +177,14 @@ public class MessageGroupReconnectDistributionTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void produceMessages(int numMessages) throws JMSException {
|
private void produceMessages(int numMessages) throws JMSException {
|
||||||
|
int groupID=0;
|
||||||
for (int i = 0; i < numMessages; i++) {
|
for (int i = 0; i < numMessages; i++) {
|
||||||
|
// groups of 10
|
||||||
|
if (i>0 && i%10==0) {
|
||||||
|
groupID++;
|
||||||
|
}
|
||||||
TextMessage msga = session.createTextMessage("hello " + i);
|
TextMessage msga = session.createTextMessage("hello " + i);
|
||||||
msga.setStringProperty("JMSXGroupID", msga.getText());
|
msga.setStringProperty("JMSXGroupID", "Group-"+groupID);
|
||||||
producer.send(msga);
|
producer.send(msga);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user