Interface KafkaExecutionContext

All Superinterfaces:
BaseExecutionContext, NativeExecutionContext

public interface KafkaExecutionContext extends NativeExecutionContext
Execution context specialized for Kafka.
Author:
Jeoffrey HAEYAERT (jeoffrey.haeyaert at graviteesource.com), GraviteeSource Team
  • Field Details

  • Method Details

    • apiKey

      org.apache.kafka.common.protocol.ApiKeys apiKey()
    • correlationId

      int correlationId()
    • request

      KafkaRequest request()
    • response

      KafkaResponse response()
    • connectionContext

      KafkaConnectionContext connectionContext()
      Access the connection context.
      Returns:
      the connection context.
    • principal

      org.apache.kafka.common.security.auth.KafkaPrincipal principal()
      Access the principal of the current execution context.
      Returns:
      the principal of the current execution context.
    • networkController

      NetworkController networkController()
      Access the network controller of the current execution context.
      Returns:
      the network controller of the current execution context.
    • addActionOnResponse

      void addActionOnResponse(Function<KafkaExecutionContext,io.reactivex.rxjava3.core.Completable> onResponseCallback)
      Allows defining an action in the request phase to be executed at the response phase.
      Parameters:
      onResponseCallback - the action to be executed at the response phase.
    • interruptWith

      io.reactivex.rxjava3.core.Completable interruptWith(org.apache.kafka.common.protocol.Errors errors)
      Interrupts the current execution while indicating that the response can be sent "as is" to the downstream.
      Parameters:
      errors - the Errors to interrupt the chain and create a response with.
    • interruptWith

      <T extends org.apache.kafka.common.requests.AbstractResponse> io.reactivex.rxjava3.core.Completable interruptWith(T response)
      Interrupts the current execution while indicating that the response can be sent "as is" to the downstream.
      Parameters:
      response - the AbstractResponse to interrupt the chain with.