Database Reference
In-Depth Information
public void
deactivate() {
}
Finally, topologies can implement transactional semantics with an
appropriate spout implementation. When a bolt executes an
ack
or
fail
command on a
Tuple
object, this event is passed up to the spout to allow
the tuple's processing to either be committed or reprocessed:
public void
ack(Object msgId) {
}
public void
fail(Object msgId) {
}
In practice, these events are a holdover from older versions of Storm. For
new transactional topologies, the recommendation is to use the Trident
interface available from Storm 0.8.0 onward. This alternative interface,
discussed later in this chapter, provides a cleaner mechanism for
implementing transactional semantics in a topology.
The only other method to implement is the
getComponentConfiguration
method. This is used for additional
configuration of spouts and will normally be unused and can simply return
null
:
public
Map<String, Object> getComponentConfiguration()
{
return null
;
}