I would like to inherit the event-based communication to trigger automations
I know Corteza has message-bus … but the docs are not enough to properly set it up
so how would I set it up, and use it with automations?
also, if I wanna extend it to an external message-bus like Kafka for example … is that possible ?
couldn’t wait to have this on the docs … thanks @peter
so to validate my understanding of the big picture here
the message-bus operates inside Corteza ecosystem and to push its messages outside for (Kafka, RabbidMQ…etc) I need to read it and push it using HTTP request
I have a couple of questions here
to push each message to an external message-bus using HTTP would that have a performance issue?
for example, if I have Module X and I have the wirte-to-queue workflow runs on AfterUpdate. if I updated 10K of that module I would get 10K runs of write-to-queue and 10K runs of read-from-queue and 10K http requests that push the messages … so my system would get in total 40K of HTTP requests in the relatively same time … hope this is clear.
what’s the characteristic of the message-bus?
will the message-bus write each message to the DB to keep it till the message consumed?
can I consume a message multiple times? or does it get deleted after it consumed consume ??
lastly, any inputs on how can we properly monitor each message pushed and consumed from the bus?
let me know if you need more explanation … thanks
the message-bus operates inside Corteza ecosystem and to push its messages outside for (Kafka, RabbidMQ…etc) I need to read it and push it using HTTP request
yes, I used the HTTP request because we have (so far) no workflow function to natively push to Kafka (which is probably just the same thing, just a useful wrapper)
to push each message to an external message-bus using HTTP would that have a performance issue?
not a big performance hit, but a slightly bigger than using native Kafka writer (ie, messagebus kafka consumer)
for example, if I have Module X and I have the wirte-to-queue workflow runs on AfterUpdate. if I updated 10K of that module I would get 10K runs of write-to-queue and 10K runs of read-from-queue and 10K http requests that push the messages … so my system would get in total 40K of HTTP requests in the relatively same time … hope this is clear.
with 10k record updates you would only get 10k HTTP requests, as every push to queue amounts to 1 read from queue, which means 1 push via HTTP
will the message-bus write each message to the DB to keep it till the message consumed?
queues have an internal mechanism (not DB) in memory, and yes they keep listening until the message is consumed
you cannot consume the same message multiple times + there is no profiler/list tool of any kind so far
Messagebus is a subsystem that keeps growing and will eventually have all these features, but time and priority limitations prevent us from further upgrades (short-term).
If you wish to implement the kafka messagebus consumer (which wouldnt be such a detailed task), you can create a PR.
If you have more time-sensitive deadlines, you can sponsor the development of the monitoring tool/kafka writer or any official support with @mia.arh
so far we discussed rewriting the message to the external message-bus(Kafka) after we write it to the internal message-bus (Corteza) … what if we want directly connect the Corteza-server to the external message-bus(Kafka) … how to approach that ?
also, read messages from the external message-bus(Kafka) so I can make use of external systems events in Corteza
the idea here is to make Corteza-server part of my ecosystem, not just 3rd party service
follow up question here (maybe a generalized one too!)
why did you guys make a custom message-bus while there are plenty of well-known open-source solutions out there ? is it due to some performance constraints?
Hi @tjerman , In extension to the message queue workflow example. I tried to extract the specific item from json received in queue and do further processing like calling http request using that value. But unable to do so as when I try to expressionise the value it prints as is (eg: wanted to extract key (foo) from event info and call http request).