Skip to content

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:

  1. Within a FHIR Server Endpoint using the SubscriptionMatchingInterceptor:
// FHIR Server Config
myDaoConfig.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.RESTHOOK);
myDaoConfig.setSubscriptionMatchingEnabled(true);
mySubscriptionInterceptorLoader.registerInterceptors();
  1. 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);
Clone this wiki locally