Search code examples
javamessage-queueapache-stormapache-kafkatrident

Compare Opaque or Transactional Kafka spout


What is the difference between OpaqueTridentKafkaSpout and TransactionalTridentKafkaSpout? When would you use one over the other?


Solution

  • It is not about which one is better, it is about your requirements.
    Storm trident topologies deal with batches of tuples.

    • A Transactional storm spout guarantees that batches are non-overlapping and that the same batch will always contains the same set of tuples.
    • An Opaque storm spout guarantees that batches are non-overlapping, but the contents of a batch may change.

    Which to use use is up to your system requirements and semantics.