Both Kafka and RabbitMQ can be used for implementing the Publish/Subscribe Pattern in microservices.
Kafka is a popular open-source stream processing platform that provides a Publish/Subscribe messaging system, and RabbitMQ is another popular open-source message broker that provides a similar system.
https://learn.microsoft.com/en-us/azure/architecture/patterns/publisher-subscriber