Introducing Trident spouts
Let's first take a look at the spout in the topology. In contrast to Storm, Trident introduces the concept of batches. Unlike Storm spouts, Trident spouts must emit tuples in batches.
Each batch is given its own unique transaction identifier. A spout determines the composition of a batch based on the constraints of its contract. There are three types of contracts for spouts: Non-transactional, Transactional, and Opaque.
Non-transactional spouts provide no guarantee on the composition of the batches and might overlap. Two different batches might contain the same tuples. Transactional spouts guarantee that batches are non-overlapping and that the same batch always contains the same tuples. Opaque spouts guarantee that batches ...
Get Storm Blueprints: Patterns for Distributed Real-time Computation now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.