-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Subscription Startup Resiliency
Ken Stevens edited this page Jan 10, 2019
·
11 revisions
There are two ways to perform Subscription Matching using the HAPI-FHIR JPA Server:
- Within a FHIR Server Endpoint using the SubscriptionMatchingInterceptor. Within the FHIR Server:
myDaoConfig.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.RESTHOOK);
myDaoConfig.setSubscriptionMatchingEnabled(true);
mySubscriptionInterceptorLoader.registerInterceptors();
- Outside of the FHIR Server Endpoint using a StandaloneSubscriptionMessageHandler: Within the FHIR Server:
myDaoConfig.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.RESTHOOK);
myDaoConfig.setSubscriptionMatchingEnabled(false);
mySubscriptionInterceptorLoader.registerInterceptors();
Also, create your own interceptor within the FHIR Server that sends all Resources to a SubscribableChannel. Then subscribe the StandaloneSubscriptionMessagHandler to that SubcribableChannel:
mySubscribableChannel.subscribe(myStandaloneSubscriptionMessageHandler);