int largestEventSize = 512*1024;
long largestWindowSize = 1*1024*1024;
for (String[] srcs : srcNames)
{
PhysicalSourceConfig src1 = DatabusRelayTestUtil.createPhysicalConfigBuilder(
(short) (i + 1),DatabusRelayTestUtil.getPhysicalSrcName(srcs[0]), "mock",
500, eventRatePerSec, srcs);
srcConfigs[i++] = src1;
}
int relayPort = 11993;
final DatabusRelayMain relay1 = DatabusRelayTestUtil.createDatabusRelayWithSchemaReg(1019,
relayPort, 10 * 1024 * 1024, srcConfigs, SCHEMA_REGISTRY_DIR);
final DatabusRelayMain relay3 = DatabusRelayTestUtil.createDatabusRelayWithSchemaReg(1020,
relayPort, 10 * 1024 * 1024, srcConfigs, SCHEMA_REGISTRY_DIR);
Assert.assertNotNull(relay1);
Assert.assertNotNull(relay3);
r1 = new DatabusRelayTestUtil.RelayRunner(relay1);
final DbusEventsTotalStats stats = relay1.getInboundEventStatisticsCollector().getTotalStats();
final DbusEventsTotalStats stats3 = relay3.getInboundEventStatisticsCollector().getTotalStats();
// create chained relay
PhysicalSourceConfig[] chainedSrcConfigs = new PhysicalSourceConfig[srcNames.length];
int j = 0;
for (String[] srcs : srcNames)
{
PhysicalSourceConfig src1 = DatabusRelayTestUtil.createPhysicalConfigBuilder(
(short) (j + 1),DatabusRelayTestUtil.getPhysicalSrcName(srcs[0]),
"localhost:" + relayPort, 500, eventRatePerSec,0,largestEventSize,largestWindowSize,srcs);
chainedSrcConfigs[j++] = src1;
}
int chainedRelayPort = relayPort + 1;