more realistic test with short lived groups rather than single entry

This commit is contained in:
gtully 2014-12-08 13:57:32 +00:00
parent db65c2e027
commit 919099b419
1 changed files with 6 additions and 1 deletions

View File

@ -177,9 +177,14 @@ public class MessageGroupReconnectDistributionTest {
}
private void produceMessages(int numMessages) throws JMSException {
int groupID=0;
for (int i = 0; i < numMessages; i++) {
// groups of 10
if (i>0 && i%10==0) {
groupID++;
}
TextMessage msga = session.createTextMessage("hello " + i);
msga.setStringProperty("JMSXGroupID", msga.getText());
msga.setStringProperty("JMSXGroupID", "Group-"+groupID);
producer.send(msga);
}
}