-
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:
// FHIR Server Config
myDaoConfig.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.RESTHOOK);
myDaoConfig.setSubscriptionMatchingEnabled(true);
mySubscriptionInterceptorLoader.registerInterceptors();
- Outside of the FHIR Server Endpoint using a StandaloneSubscriptionMessageHandler:
// FHIR Server Config
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 StandaloneSubscriptionMessageHandler to that SubcribableChannel:
// Message Consumer Config:
mySubscribableChannel.subscribe(myStandaloneSubscriptionMessageHandler);