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 typeV- The value type- Record Components:
consumerRecord- The consumed recordtopic- The topic being processedpartition- The partition being processedoffset- The offset being processedclientId- The Micronaut Kafka client idgroupId- 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 Summary
ConstructorsConstructorDescriptionInterceptionContext(@NonNull ConsumerRecord<K, V> consumerRecord, @NonNull String topic, int partition, long offset, @NonNull String clientId, @Nullable String groupId) Creates an instance of aInterceptionContextrecord class. -
Method Summary
Modifier and TypeMethodDescription@NonNull StringclientId()Returns the value of theclientIdrecord component.@NonNull ConsumerRecord<K, V> Returns the value of theconsumerRecordrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable StringgroupId()Returns the value of thegroupIdrecord component.final inthashCode()Returns a hash code value for this object.longoffset()Returns the value of theoffsetrecord component.intReturns the value of thepartitionrecord component.@NonNull Stringtopic()Returns the value of thetopicrecord component.final StringtoString()Returns a string representation of this record class.
-
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 aInterceptionContextrecord class.- Parameters:
consumerRecord- the value for theconsumerRecordrecord componenttopic- the value for thetopicrecord componentpartition- the value for thepartitionrecord componentoffset- the value for theoffsetrecord componentclientId- the value for theclientIdrecord componentgroupId- the value for thegroupIdrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
consumerRecord
Returns the value of theconsumerRecordrecord component.- Returns:
- the value of the
consumerRecordrecord component
-
topic
-
partition
-
offset
-
clientId
-
groupId
-