Search in sources :

Example 1 with MessageSerializer

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());
}
Also used : MessageSerializer(org.apache.oozie.event.messaging.MessageSerializer)

Example 2 with MessageSerializer

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);
}
Also used : MessageSerializer(org.apache.oozie.event.messaging.MessageSerializer) SLAMessage(org.apache.oozie.client.event.message.SLAMessage)

Aggregations

MessageSerializer (org.apache.oozie.event.messaging.MessageSerializer)2 SLAMessage (org.apache.oozie.client.event.message.SLAMessage)1