Interface KafkaStructuredLoggingService.KeySelector<E>

  • Enclosing class:
    KafkaStructuredLoggingService<I extends com.linecorp.armeria.common.Request,​O extends com.linecorp.armeria.common.Response,​L>
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public static interface KafkaStructuredLoggingService.KeySelector<E>
    Implements "key" selector of Kafka based service log writer. Kafka as a notion of the "key" which is used as a criteria to guarantee message ordering and to achieve fine-distributed message partitioning. Users need to implement this interface in order to select arbitrary key from the request context or from the content included in a request.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      byte[] selectKey​(com.linecorp.armeria.common.logging.RequestLog log, E structuredLog)
      Selects a key which should be associated toe the record given as structuredLog.
    • Method Detail

      • selectKey

        @Nullable
        byte[] selectKey​(com.linecorp.armeria.common.logging.RequestLog log,
                         E structuredLog)
        Selects a key which should be associated toe the record given as structuredLog.
        Returns:
        A byte-array represented key or null