RabbitMQ or Kafka Listener

Hi Expert,
Any way to create RabbitMQ or Kafka Listener for publishing for subscribing to queue?
Please give me an example.

Regards.
Banik

This post may help How Add nodejs App to frappe & bench? - #5 by revant_one