// Now start publishing messages for the subscribed topics in one of the
// regions and verify that it gets delivered and consumed in all of the
// other ones.
Publisher publisher = regionClientsMap.values().iterator().next().getPublisher();
for (int i = 0; i < batchSize; i++) {
publisher.asyncPublish(ByteString.copyFromUtf8("Topic" + i), Message.newBuilder().setBody(
ByteString.copyFromUtf8("Message" + i)).build(), new TestCallback(queue), null);
assertTrue(queue.take());
}
// Make sure each region consumes the same set of published messages.
for (int i = 0; i < regionClientsMap.size(); i++) {