Adding a Pika Event Broker in Python

Rasa Version      :         2.8.12
Minimum Compatible Version: 2.8.9
Rasa SDK Version  :         2.8.4
Rasa X Version    :         None
Python Version    :         3.8.10
Operating System  :         Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29

Hi, I’m using this rasa version for my development. I just want to ask for this python code for pika event broker right where exactly the path that i should put? is it under actions folder? im not sure where i should put this python code for running my pika event broker.

import asyncio

from rasa.core.brokers.pika import PikaEventBroker from rasa.core.tracker_store import InMemoryTrackerStore

pika_broker = PikaEventBroker(‘localhost’, ‘username’, ‘password’, queues=[‘rasa_events’], event_loop=event_loop ) asyncio.run(pika_broker.connect())

tracker_store = InMemoryTrackerStore(domain=domain, event_broker=pika_broker)

Are you trying to configure Rasa to write to RabbitMQ? If so, configure the endpoints.yml as explained in the docs here. No code is required for this.

If you want to read the events Rasa writes to RabbitMQ, it’s described here but there are a lot of reader options for Rabbit that don’t require coding.

I have actually did that and it works. Right now what im trying to do is to masking the sensitive data before export it inside of Rasa x on my cloud instance. I want to completely remove the sensitive data from the database before export it on Rasa x. Just curious on the python file where is the path that i should put if i want to try it? and what is the use of python file of implementing a pika event customer?