+ // Do we need to do any validation of properties before calling the factory?
+ Properties prop = new Properties();
+ prop.setProperty("ServiceName", "localhost:6845/events");
+ prop.setProperty("topic", "A1-P");
+ prop.setProperty("host", "localhost:6845");
+ prop.setProperty("contenttype", "application/json");
+ prop.setProperty("username", "admin");
+ prop.setProperty("password", "admin");
+ prop.setProperty("group", "users");
+ prop.setProperty("id", "policy-agent");
+ prop.setProperty("TransportType", "HTTPNOAUTH");
+ prop.setProperty("timeout", "15000");
+ prop.setProperty("limit", "1000");
+ try {
+ consumer = MRClientFactory.createConsumer(prop);
+ this.alive = true;
+ } catch (IOException e) {
+ logger.error("Exception occurred while creating Dmaap Consumer", e);
+ }