New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add RabbitMQ message header to "rasa export" #5318
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR 🚀
One question: When an EventConsumer
needs to know this, how would it e.g. work for the KafkaEventBroker? Or maybe the part I'm missing is, what does the EventConsumer then do with it?
`PikaEventBroker`, else `None`. | ||
|
||
""" | ||
if isinstance(self.event_broker, (PikaEventBroker, PikaProducer)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional: you could use issubclass
and just check against PikaEventBroker
which would be a tiny bit more robust
|
||
""" | ||
if isinstance(self.event_broker, (PikaEventBroker, PikaProducer)): | ||
return {RASA_EXPORT_PROCESS_ID_HEADER_NAME: uuid.uuid4().hex} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional: we could also just have this constant at the top of the this module since it's not used anywhere else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, you're using this in Rasa X? Then it makes sense to have this in rasa.core.constants
|
||
""" | ||
if isinstance(self.event_broker, (PikaEventBroker, PikaProducer)): | ||
self.event_broker.publish(event=event, headers=headers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional: Should we make the headers an attribute so that we don't have different signatures? Also, I guess the headers wouldn't change between messages, right?
Ok, just saw the telemetry issue. Then my questions are answered 👍 Good to go! |
Proposed changes:
rasa export
#5317Status (please check what you already did):
black
(please check Readme for instructions)