public abstract class TupleToMessage extends Object implements Serializable
Tuples to Message objects for posting on a RabbitMQ
exchange.| Constructor and Description |
|---|
TupleToMessage() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract String |
determineExchangeName(backtype.storm.tuple.Tuple input)
Determine the exchange where the message is published to.
|
protected String |
determineRoutingKey(backtype.storm.tuple.Tuple input)
Determine the routing key used for this message.
|
protected abstract byte[] |
extractBody(backtype.storm.tuple.Tuple input)
Extract message body as a byte array from the incoming tuple.
|
protected void |
prepare(Map stormConfig) |
protected Message |
produceMessage(backtype.storm.tuple.Tuple input)
Convert the incoming
Tuple on the Storm stream to a Message
for posting to RabbitMQ. |
protected String |
specifyContentEncoding(backtype.storm.tuple.Tuple input)
Specify message body content encoding.
|
protected String |
specifyContentType(backtype.storm.tuple.Tuple input)
Specify message body content type.
|
protected Map<String,Object> |
specifyHeaders(backtype.storm.tuple.Tuple input)
Specify the headers to be sent along with this message.
|
protected boolean |
specifyMessagePersistence(backtype.storm.tuple.Tuple input)
Specify whether each individual message should make use of message persistence
when it's on a rabbitmq queue.
|
protected void prepare(Map stormConfig)
protected Message produceMessage(backtype.storm.tuple.Tuple input)
Tuple on the Storm stream to a Message
for posting to RabbitMQ.input - The incoming Tuple from StormMessage for the RabbitMQProducer to publish. If
transformation fails this should return Message.NONE.protected abstract byte[] extractBody(backtype.storm.tuple.Tuple input)
input - the incoming tupleprotected abstract String determineExchangeName(backtype.storm.tuple.Tuple input)
input - the incoming tupleprotected String determineRoutingKey(backtype.storm.tuple.Tuple input)
input - the incoming tupleprotected Map<String,Object> specifyHeaders(backtype.storm.tuple.Tuple input)
input - the incoming tupleprotected String specifyContentType(backtype.storm.tuple.Tuple input)
input - the incoming tupleprotected String specifyContentEncoding(backtype.storm.tuple.Tuple input)
input - the incoming tupleprotected boolean specifyMessagePersistence(backtype.storm.tuple.Tuple input)
input - the incoming tupleCopyright © 2013-2015. All Rights Reserved.