Annotation Interface KafkaClient


@Documented @Retention(RUNTIME) @Introduction @Singleton public @interface KafkaClient
An introduction advice that automatically implements interfaces and abstract classes and creates KafkaProducer instances.
Since:
1.0
Author:
Graeme Rocher
See Also:
  • KafkaClientIntroductionAdvice
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Constants for the ack setting for the client, which impacts message delivery durability.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
     
    boolean
    By default when specifying an array or List the object will be serializes to a JSON array.
    The executor to use to enable non-blocking producer methods.
     
    The maximum duration to block synchronous send operations.
    io.micronaut.context.annotation.Property[]
    Additional properties to configure with for Consumer.
    boolean
    Whether to include timestamps in outgoing messages.
    The TransactionalId to use for transactional delivery.
    Same as id().
  • Element Details

    • value

      @AliasFor(member="id") String value
      Same as id().
      Returns:
      The id of the client
      Default:
      ""
    • id

      @AliasFor(member="value") String id
      Returns:
      The id of the client
      Default:
      ""
    • transactionalId

      String transactionalId
      The TransactionalId to use for transactional delivery. This enables reliability semantics which span multiple producer sessions since it allows the client to guarantee that transactions using the same TransactionalId have been completed prior to starting any new transactions. If no TransactionalId is provided, then the producer is limited to idempotent delivery. If a TransactionalId is configured, enable.idempotence is implied. By default, the TransactionId is not configured, which means transactions cannot be used.
      Returns:
      true to enable transaction
      Default:
      ""
    • maxBlock

      String maxBlock
      The maximum duration to block synchronous send operations.
      Returns:
      The timeout
      Default:
      ""
    • timestamp

      boolean timestamp
      Whether to include timestamps in outgoing messages.
      Returns:
      True if time stamps should be included. Defaults to false.
      Default:
      false
    • batch

      boolean batch
      By default when specifying an array or List the object will be serializes to a JSON array. By specifying true this will instead send each record in the the array or list as an individual ProducerRecord.
      Returns:
      Whether to receive a batch of records or not
      Default:
      false
    • properties

      io.micronaut.context.annotation.Property[] properties
      Additional properties to configure with for Consumer.
      Returns:
      The properties
      Default:
      {}
    • acks

      int acks
      Returns:
      The ack setting for the client, which impacts message delivery durability.
      See Also:
      Default:
      -2147483648
    • executor

      String executor
      The executor to use to enable non-blocking producer methods.
      Returns:
      The name of the executor to use
      Default:
      ""