I am Atanu Garai from SocialWell (https://www.socialwell.net) and we are using Directus for almost a year primarily as the CMS for blogs and posting opportunities in NGOMIS (https://www.ngomis.com).
Lately, we needed to take the content stored in Directus to an AI pipeline and we were thinking to use Kafka. Do you suggest Flows can give native event trigger which can be used to create a Kafka producer event. The other option is to create a custom Directus extension, which we haven’t given a try yet.
Any thoughts?
2 Answers
2
I think I’d try Flows first, unless you specifically need Directus to talk to Kafka directly.
Maybe use an event-triggered Flow to send the record ID and event type to a small HTTP service, then let that service handle the Kafka producer. That way you don’t have to maintain a Directus extension just for publishing messages.
One thing I’d be a bit careful about is retries. If Kafka is temporarily unavailable, you probably don’t want a CMS update to fail because of it, or silently lose the event.
I’m not entirely sure what delivery guarantees Directus Flows would give you in this setup, so that’s something I’d check before relying on it in production.
Are you planning to send the full content to Kafka, or just the IDs so the AI pipeline can fetch the latest version?
Seems like the websockets would suit this the best.
Flow is working along with an API bridge acting as Kafka producer. Noted on the retry edge case, would check that.
– socialwell