Package org.apache.storm.jms
Interface JmsTupleProducer
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
JsonTupleProducer
Interface to define classes that can produce a Storm
Values objects
from a javax.jms.Message object>.
Implementations are also responsible for declaring the output fields they produce.
If for some reason the implementation can't process a message
(for example if it received a javax.jms.ObjectMessage
when it was expecting a javax.jms.TextMessage it should
return null to indicate to the JmsSpout that
the message could not be processed.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddeclareOutputFields(OutputFieldsDeclarer declarer) Declare the output fields produced by this JmsTupleProducer.toTuple(javax.jms.Message msg) Process a JMS message object to create a Values object.
-
Method Details
-
toTuple
Process a JMS message object to create a Values object.- Parameters:
msg- - the JMS message- Returns:
- the Values tuple, or null if the message couldn't be processed.
- Throws:
javax.jms.JMSException
-
declareOutputFields
Declare the output fields produced by this JmsTupleProducer.- Parameters:
declarer- The OuputFieldsDeclarer for the spout.
-