FHIR Chat · Subscription vs. Interceptor/Hook · subscriptions

Stream: subscriptions

Topic: Subscription vs. Interceptor/Hook


view this post on Zulip OS (Oct 22 2020 at 17:09):

We are building a FHIR system where the data is ingested through FHIR, but then needs to be transformed by a separate service. I'm trying to find the balances between writing a custom interceptor to take that data after it's been saved and send that data to our job queue (MSK/Kafka) or whether to use Subscriptions with Kafka-rest. I think I've settled on the latter approach, but wanted to post here to see if folks had any thoughts, feedback. Are subscriptions any more or less reliable than using interceptors to kick off that job? Also - will subscriptions change signnificantly enough from an implementation standpoint in R5 that we'll have to re-do our architecture?

view this post on Zulip Josh Mandel (Oct 22 2020 at 23:48):

Re: "interceptors," this isn't a standardized FHIR concept; I'm guessing you're using a HAPI server + its interceptor framework?

view this post on Zulip OS (Oct 23 2020 at 14:23):

Josh Mandel said:

Re: "interceptors," this isn't a standardized FHIR concept; I'm guessing you're using a HAPI server + its interceptor framework?

That's exactly right. I'll post there as well. But I'd be curious if anyone from this group has thought about this. Since (it seems to me) many requirements can be achieved by either approach. Of course Subscriptions seem to be the natural better option (no custom code that needs to be written/maintained/tested/etc, and it's part of the standard rather than interceptors being specific go HAPI), but just wanted to ask. For example, are there any inherent risks in using Subscriptions that would be overcome by interceptors and vice versa?

view this post on Zulip Josh Mandel (Oct 23 2020 at 14:51):

One of the goals for r5 subscriptions has been to support this pattern -- e.g., allowing registration of subscriptions to broad topics like "any Practitioner resource update" or "any Organization change". This reflects what some of the cloud servers do with message queues, and would help provide a more standard pattern (but it's still relatively early days).


Last updated: Apr 12 2022 at 19:14 UTC