package api

Type Members

  1. case class FoundMatch(matchingReferenceMessage: MonitorObjectEnvelope) extends MonitorMatchFindResult with Product with Serializable

    A result from a MonitorMatchFinder indicating that a reference message that should match was located.

    A result from a MonitorMatchFinder indicating that a reference message that should match was located.

    matchingReferenceMessage

    The message that should match the test message that was provided

  2. case class IgnoreMessage() extends MonitorMatchFindResult with Product with Serializable

    A result from a MonitorMatchFinder indicating that, based on the information available, the provided test message should be ignored.

  3. abstract class MonitorDeserializer extends AnyRef

    An interface that instructs Detective how to deserialize messages from byte arrays into concrete Java objects.

    An interface that instructs Detective how to deserialize messages from byte arrays into concrete Java objects. If you need to convert your objects into some custom structure for use in your implementation of Detective, you can extend this class and override the deserialize method to implement your deserialization algorithm.

    Instances of this class should have a zero-arg constructor.

  4. sealed trait MonitorMatchFindResult extends AnyRef

    The common parent for any kind of result from a MonitorMatchFinder

  5. trait MonitorMatchFinder extends AnyRef

    In the Kafka Detective world, a MonitorMatchFinder is the interface responsible for determining what mesages in the given referenceWindow should be a match for the given testMessage.

    In the Kafka Detective world, a MonitorMatchFinder is the interface responsible for determining what mesages in the given referenceWindow should be a match for the given testMessage. The match finder provides a find method that can return any one of a few different results.

    Specifically, those results are:

    • A FoundMatch instance if a message that should match is found in the referenceWindow
    • A NoMatchFound instance if there should have been a message that would match, but there wasn't
    • An IgnoreMessage instance if, based on the key, we chose not to try to find a match

    Each of these situations will be reported out to the various configured MonitorReporters by Detective.

    Instances of this class should have a zero-arg constructor.

  6. sealed trait MonitorMatchTestResult extends AnyRef

    A type indicating the result of a match test.

  7. trait MonitorMatchTester extends AnyRef

    In the Kafka Detective world, the MonitorMatchTester is responsible for determining whether or not a given testMessage and a given referenceMessage match.

    In the Kafka Detective world, the MonitorMatchTester is responsible for determining whether or not a given testMessage and a given referenceMessage match. At this point the assumption is that these messages should match because a MonitorMatchFinder already paired them up. However, the tester has the responsibility of determining if they actually do match.

    If you need to do expensive computation or have some level of complexity when determining equivalence, it is ideal to stick that logic inside a MonitorMatchTester, since that code is run many, many fewer times than code defined in a MonitorMatchFinder.

    A tester can return one of two possible results:

    There are a handful of default match testers provided in the me.frmr.kafka.detective.matchtester package of the Detective daemon.

    Instances of this class should have a zero-arg constructor.

  8. case class MonitorObjectEnvelope(messageOffset: Long, messagePartition: Int, messageTimestamp: Long, keyClass: Class[_], keyInstance: AnyRef, valueClass: Class[_], valueInstance: AnyRef) extends Product with Serializable

    A wrapper around a message received from a Kafka topic.

    A wrapper around a message received from a Kafka topic. This is the Kafka Detective equivalent of a standard ConsumerRecord from the Kafka client APIs. It is intentionally typed a bit differently to facilitate use across JVM languages.

    messageOffset

    The offset of the message this envelope contains.

    messagePartition

    The partition this message occured on.

    messageTimestamp

    The timestamp associated with this message.

    keyClass

    A java.lang.Class describing what the keyInstance actually is.

    keyInstance

    The key for the message this envelope contains.

    valueClass

    A java.lang.Class describing what the valueInstance actually is.

    valueInstance

    The value of the message this envelope contains.

  9. trait MonitorReporter extends AnyRef

    In the Kafka Detective world, a MonitorReporter is responsible for reporting match events out to some other system.

    In the Kafka Detective world, a MonitorReporter is responsible for reporting match events out to some other system. You could imagine that this is reporting out to... anything, really. It could be a metrics aggregator, it could be another Kafka topic, it could be anything!

    Instances of this class should have a constructor that takes two arguments:

    • monitorIdentifier: String - the string identifier for the monitor this reporter instance is for
    • config: java.util.Map[String, Object] - The reporter-configs block from daemon configuration
  10. trait MonitorReporterTransformer extends AnyRef

    In the Kafka Detective world, a MonitorReporterTransformer is responsible for doing any kind of transformation required before writing the object out to some external source.

    In the Kafka Detective world, a MonitorReporterTransformer is responsible for doing any kind of transformation required before writing the object out to some external source. Not all reporters may make use of a transformer, and they each have their own config keys for configuring the transformers.

    Instances of this class should have a zero-arg constructor.

  11. case class NoMatchFound() extends MonitorMatchFindResult with Product with Serializable

    A result from a MonitorMatchFinder indicating that no reference message that should match the provided test message was found in the reference window.

  12. case class SuccessfulMatchTest() extends MonitorMatchTestResult with Product with Serializable

    A match test result type indicating the match test was successful and that the provided testMessage and referenceMessage actually do match.

  13. case class UnsuccessfulMatchTest(reason: String, testMessage: MonitorObjectEnvelope, referenceMessage: MonitorObjectEnvelope) extends MonitorMatchTestResult with Product with Serializable

    A match test result type indicating the match test was unsuccessful and that the provided testMessage and referenceMessage do not match.

    A match test result type indicating the match test was unsuccessful and that the provided testMessage and referenceMessage do not match.

    reason

    A string reason indicating why the match failed

    testMessage

    The test message from the comparison that failed

    referenceMessage

    The reference message from the comparison that failed

Ungrouped