Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
osoykan committed Nov 29, 2024
1 parent 3d958fb commit 61bbac1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ sealed class KafkaRegistry(open val url: String) {
}
}

class StoveKafkaValueSerializer<T : Any> : Serializer<T> {
class ProtobufValueSerializer<T : Any> : Serializer<T> {
private val protobufSerde: KafkaProtobufSerde<Message> = KafkaRegistry.createSerde()

override fun serialize(
Expand All @@ -52,7 +52,7 @@ class StoveKafkaValueSerializer<T : Any> : Serializer<T> {
}
}

class StoveKafkaValueDeserializer : Deserializer<Message> {
class ProtobufValueDeserializer : Deserializer<Message> {
private val protobufSerde: KafkaProtobufSerde<Message> = KafkaRegistry.createSerde()

override fun deserialize(
Expand Down Expand Up @@ -130,7 +130,7 @@ open class KafkaTestSpringBotApplicationForProtobufSerde {
ConsumerConfig.GROUP_ID_CONFIG to config.groupId,
ConsumerConfig.AUTO_OFFSET_RESET_CONFIG to config.offset,
ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG to Serdes.String().deserializer().javaClass,
ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG to StoveKafkaValueDeserializer().javaClass,
ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG to ProtobufValueDeserializer().javaClass,
ConsumerConfig.HEARTBEAT_INTERVAL_MS_CONFIG to 2000,
ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG to 6000,
ConsumerConfig.MAX_POLL_INTERVAL_MS_CONFIG to 6000
Expand All @@ -145,7 +145,7 @@ open class KafkaTestSpringBotApplicationForProtobufSerde {
mapOf(
ProducerConfig.BOOTSTRAP_SERVERS_CONFIG to config.bootstrapServers,
ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG to Serdes.String().serializer().javaClass,
ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG to StoveKafkaValueSerializer<Any>().javaClass,
ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG to ProtobufValueSerializer<Any>().javaClass,
ProducerConfig.ACKS_CONFIG to "1"
)
)
Expand Down

0 comments on commit 61bbac1

Please sign in to comment.