Interface KafkaPrincipalSerde
public interface KafkaPrincipalSerde
Serializer/Deserializer interface for
KafkaPrincipal
for the purpose of inter-broker forwarding.
Any serialization/deserialization failure should raise a SerializationException
to be consistent.-
Method Summary
Modifier and Type Method Description KafkaPrincipal
deserialize(byte[] bytes)
Deserialize aKafkaPrincipal
from byte array.byte[]
serialize(KafkaPrincipal principal)
Serialize aKafkaPrincipal
into byte array.
-
Method Details
-
serialize
Serialize aKafkaPrincipal
into byte array.- Parameters:
principal
- principal to be serialized- Returns:
- serialized bytes
- Throws:
SerializationException
-
deserialize
Deserialize aKafkaPrincipal
from byte array.- Parameters:
bytes
- byte array to be deserialized- Returns:
- the deserialized principal
- Throws:
SerializationException
-