* limitations under the License.
* ============LICENSE_END=========================================================
*/
+
package org.onap.aai.dmaap;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
+
import java.util.Objects;
import java.util.UUID;
+
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;
+
import org.apache.log4j.MDC;
import org.json.JSONException;
import org.json.JSONObject;
@Override
public void onMessage(Message message) {
- if(restTemplate == null){
+ if (restTemplate == null) {
return;
}
eventName = jo.getString(EVENT_TOPIC);
}
- LoggingContext.targetEntity ("DMAAP");
+ LoggingContext.targetEntity("DMAAP");
if (jo.getString(EVENT_TOPIC) != null) {
eventName = jo.getString(EVENT_TOPIC);
LoggingContext.targetServiceName(eventName);
LoggingContext.statusCode(StatusCode.COMPLETE);
LoggingContext.responseCode(LoggingContext.SUCCESS);
LOGGER.info(eventName + "|" + aaiEvent);
-
+
HttpEntity httpEntity = new HttpEntity(aaiEvent, httpHeaders);
String transportType = environment.getProperty("dmaap.ribbon.transportType", "http");
- String baseUrl = transportType + "://" + environment.getProperty("dmaap.ribbon.listOfServers");
+ String baseUrl = transportType + "://" + environment.getProperty("dmaap.ribbon.listOfServers");
String endpoint = "/events/" + eventName;
if ("AAI-EVENT".equals(eventName)) {
} catch (JMSException | JSONException e) {
LoggingContext.statusCode(StatusCode.ERROR);
LoggingContext.responseCode(LoggingContext.DATA_ERROR);
- LOGGER.error("AAI_7350 Error parsing aaievent jsm message for sending to dmaap. {} {}", jsmMessageTxt, LogFormatTools.getStackTop(e));
+ LOGGER.error("AAI_7350 Error parsing aaievent jsm message for sending to dmaap. {} {}", jsmMessageTxt,
+ LogFormatTools.getStackTop(e));
} catch (Exception e) {
LoggingContext.statusCode(StatusCode.ERROR);
LoggingContext.responseCode(LoggingContext.AVAILABILITY_TIMEOUT_ERROR);
- LOGGER.error("AAI_7350 Error sending message to dmaap. {} {}" , jsmMessageTxt, LogFormatTools.getStackTop(e));
+ LOGGER.error("AAI_7350 Error sending message to dmaap. {} {}", jsmMessageTxt,
+ LogFormatTools.getStackTop(e));
}
}