use of org.apache.oozie.event.messaging.MessageSerializer in project oozie by apache.
the class JMSJobEventListener method serializeJMSMessage.
private void serializeJMSMessage(JobMessage jobMessage, String topicName) {
MessageSerializer serializer = MessageFactory.getMessageSerializer();
String messageBody = serializer.getSerializedObject(jobMessage);
sendMessage(jobMessage.getMessageProperties(), messageBody, topicName, serializer.getMessageFormat());
}
use of org.apache.oozie.event.messaging.MessageSerializer in project oozie by apache.
the class JMSSLAEventListener method sendSLANotification.
protected void sendSLANotification(SLAEvent event) {
SLAMessage slaMsg = MessageFactory.createSLAMessage(event);
MessageSerializer serializer = MessageFactory.getMessageSerializer();
String messageBody = serializer.getSerializedObject(slaMsg);
String serializerMessageFormat = serializer.getMessageFormat();
String topicName = getTopic(event);
sendJMSMessage(slaMsg, messageBody, topicName, serializerMessageFormat);
}
Aggregations