I was more thinking, if is possible to annotate the services in a way, what is what, server-service, client-service. There is ServerKafka class, but I can't find way how to use it. There is nothing like @client decorator, to be replaced, like @server.
Why would you need a decorator for Server. Here the consumer is a microservice server listening on kafka queues. A single service class cannot become a server isnt it?
This is weird example. Why the producer service, has @client decorator?
I am not sure why do you call this weird. Producer is the service which generates the message so that is why it has a client decorator.
I was more thinking, if is possible to annotate the services in a way, what is what, server-service, client-service. There is ServerKafka class, but I can't find way how to use it. There is nothing like @client decorator, to be replaced, like @server.
Why would you need a decorator for Server. Here the consumer is a microservice server listening on kafka queues. A single service class cannot become a server isnt it?
When it's appropriate to use ServerKafka class?
Can you point me to the documentation where you found this.
docs.nestjs.com/microservices/kafk...
But I can't find nothing related to where ServerKafka class, made sense to use it.
I dont think server kafka is a class here. Its just the name tht they use to distinguish between client and server