public class DefaultJMSMessageConverter extends Object implements JMSMessageConverter
Converts BytesMessage, TextMessage, and ObjectMessage to a Flume Event. All Message Property names are added as headers to the Event. The conversion of the body is as follows:
BytesMessage: Body from message is set as the body of the Event.
TextMessage: String body converted to a byte array byte getBytes(charset). Charset defaults to UTF-8 but can be configured.
ObjectMessage: Object is written to an ByteArrayOutputStream wrapped by an ObjectOutputStream and the resulting byte array is the body of the message.
Modifier and Type | Class and Description |
---|---|
static class |
DefaultJMSMessageConverter.Builder |
public List<Event> convert(javax.jms.Message message) throws javax.jms.JMSException
convert
in interface JMSMessageConverter
javax.jms.JMSException
Copyright © 2009–2019 Apache Software Foundation. All rights reserved.