Record Class ConsumerRecordInterceptor.InterceptionContext<K,V>

java.lang.Object
java.lang.Record
io.micronaut.configuration.kafka.ConsumerRecordInterceptor.InterceptionContext<K,V>
Type Parameters:
K - The key type
V - The value type
Record Components:
consumerRecord - The consumed record
topic - The topic being processed
partition - The partition being processed
offset - The offset being processed
clientId - The Micronaut Kafka client id
groupId - The Kafka consumer group id
Enclosing interface:
ConsumerRecordInterceptor<K,V>

public static record ConsumerRecordInterceptor.InterceptionContext<K,V>(@NonNull ConsumerRecord<K,V> consumerRecord, @NonNull String topic, int partition, long offset, @NonNull String clientId, @Nullable String groupId) extends Record
The context for record interception.
Since:
6.0.0
Author:
Graeme Rocher
  • Constructor Details

    • InterceptionContext

      public InterceptionContext(@NonNull ConsumerRecord<K,V> consumerRecord, @NonNull String topic, int partition, long offset, @NonNull String clientId, @Nullable String groupId)
      Creates an instance of a InterceptionContext record class.
      Parameters:
      consumerRecord - the value for the consumerRecord record component
      topic - the value for the topic record component
      partition - the value for the partition record component
      offset - the value for the offset record component
      clientId - the value for the clientId record component
      groupId - the value for the groupId record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • consumerRecord

      public @NonNull ConsumerRecord<K,V> consumerRecord()
      Returns the value of the consumerRecord record component.
      Returns:
      the value of the consumerRecord record component
    • topic

      public @NonNull String topic()
      Returns the value of the topic record component.
      Returns:
      the value of the topic record component
    • partition

      public int partition()
      Returns the value of the partition record component.
      Returns:
      the value of the partition record component
    • offset

      public long offset()
      Returns the value of the offset record component.
      Returns:
      the value of the offset record component
    • clientId

      public @NonNull String clientId()
      Returns the value of the clientId record component.
      Returns:
      the value of the clientId record component
    • groupId

      public @Nullable String groupId()
      Returns the value of the groupId record component.
      Returns:
      the value of the groupId record component