- public void init(Properties properties) {
- // Initialize the DMAAP with the properties
- // 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");
+ public void init() {
+ Properties dmaapConsumerProperties = applicationConfig.getDmaapConsumerConfig();
+ Properties dmaapPublisherProperties = applicationConfig.getDmaapPublisherConfig();
+ // No need to start if there is no configuration.
+ if (dmaapConsumerProperties == null || dmaapPublisherProperties == null || dmaapConsumerProperties.size() == 0
+ || dmaapPublisherProperties.size() == 0) {
+ logger.error("DMaaP properties Failed to Load");
+ return;
+ }