Forum Discussion
Paulo175
Nov 12, 2021Copper Contributor
Proactive messaging with Kafka
I'm trying to send proactive messages in NODEJS, and I know how it could be done once you start it from an event, like for example, a user join a channel, or even on a onMessage() event, where you can get the context and then get a list of users and finally send then some message. It is pretty clear on the docs.
But I have a different scenario. I intend to get a message, and then send it to a broker like Apache Kafka.
Once it is done, I will subscribe my bot to another topic in Apache Kafka, and then I will send it back to the user.
I will try to summarize my issue:
I get a message by using the onMessage() event, and instead of reply that message strait foward I send it to Apache Kafka to be processed; by this time I will lost the context.
Later when Apache Kafka processed the answser to be sent to the user I don't have the context anymore. But I could store de userID and TenantID and try to recreat the context and then simplely send it.
My problem is: I have no idea how to get the context outside of an event, even if I have the user and tenant id.
I've made a diagram in order to make it clear, I hope it does.
Could you help me?
Thanks in advance.
- Therese_SolimenoModerator
Hello Paulo175
Since the community has not yet responded to your post, you might want to contact Microsoft Support directly or open a case at answers.microsoft.com, where there are authorized Microsoft agents available to help with further troubleshoot with you until your issue is resolved.