Consumption interceptor in Kafka

CSDN Q & A 2022-02-13 06:29:33 阅读数:54

consumption interceptor kafka

ConsumerRecord(topic = t6, partition = 0, leaderEpoch = 0, offset = 33, CreateTime = 1625474727852, serialized key size = -1, serialized value size = 5, headers = RecordHeaders(headers = [], isReadOnly = false), key = null, value = [[email protected]).
This is the data I got in the interceptor ,kafka Messages in are stored in value in , The need now is to judge value Whether the data in is what I want to consume , But extract value The error will be reported as follows ,value The value of is [[email protected], How to extract this value , Do you know that , Kneel down and ask for the answer

img




Take the answer :

value The value of is [[email protected]
This is obviously serialized Bytes Byte type
You reverse sequence into string Just ok 了


copyright:author[CSDN Q & A],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130629303313.html