3

I've just started using Reactor Kafka. I am wondering when and why use ReactiveKafkaProducerTemplate over KafkaSender which is found in official reactor kafka reference guide?

user1955934
  • 3,185
  • 5
  • 42
  • 68

1 Answers1

6

It's your choice; it's a wrapper around the KafkaSender.

Currently, the only real value add is the use of a MessageConverter which can convert a spring-messaging Message<?> to a ProducerRecord.

Gary Russell
  • 166,535
  • 14
  • 146
  • 179
  • Thank you Gary. Would you please help me with my next question? https://stackoverflow.com/questions/57304923/reactor-kafka-exactly-once-processing-sample – user1955934 Aug 01 '19 at 08:41
  • Hi @gary-russel, does the ReactiveKafkaConsumerTemplate also support consuming spring-messaging's Message> as a ConsumerRecord? – Aniket Singla Sep 24 '21 at 11:12
  • Don't ask unrelated questions in comments; this question was about the producer template. No; it is a lightweight wrapper around the `KafkaReceiver` only. – Gary Russell Sep 24 '21 at 13:43