String configFile = CarbonUtils.getCarbonConfigDirPath() + "/throttling-config2.xml";
String ruleFile = CarbonUtils.getCarbonConfigDirPath() + "/throttling-rules2.drl";
// the configuration init will initialize task objects.
//ThrottlingConfiguration ignore = new ThrottlingConfiguration(configFile);
Task task = getThrottlingTask(configFile, ruleFile);
Resource r1 = registry.newResource();
r1.setContent("12345678"); // 8 byte in
registry.put("/bang", r1);
new ThrottlingJob().executeTask(task);