When using the module as stated in the documentation, it's not possible to get other informations about the incoming kafka message. The documentation needs to be changed a bit because the consumers are get called different than when using the normal KafkaTransporter provided by NestJS. The @Payload decorator is not needed anyways.
So when using the example from below, data would be the decoded message from Kafka without any more informations.
When using the module as stated in the documentation, it's not possible to get other informations about the incoming kafka message. The documentation needs to be changed a bit because the consumers are get called different than when using the normal
KafkaTransporter
provided by NestJS. The@Payload
decorator is not needed anyways. So when using the example from below,data
would be the decoded message from Kafka without any more informations.https://github.com/rob3000/nestjs-kafka/blob/2c560e38e91b1e4994c6c13add47fb2f0b55f182/src/kafka.service.ts#L194-L202
Furthermore, as this module is about having no reply channels (comparing to the original
KafkaTransporter
) - why is the methodcalled in the examples?
Cheers!🚀