-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Broker Api Redesign
Ken Stevens edited this page Mar 19, 2025
·
20 revisions
HAPI-FHIR requires a message broker to provide asynchronous messaging services for
- subscription processing
- mdm processing
- batch processing
Prior to HAPI version 8.2.0, HAPI-FHIR's broker api was built on top of Spring Messaging, a Spring API for JMS, a 1990s Java API for asynchronous message processing. HAPI ships with the simple Spring in-memory implementation of this API.
Since that time, a number of new message broker paradigms have emerged that have moved the industry away from JMS.
In release 8.2.0, HAPI-FHIR decouples the message broker services from Spring Messaging. SpringMessaging adapters are provided for backwards compatibility.
The new API largely mirrors with Spring Messaging API, with a few important differences. Here is a mapping from the old API to the new API.
Old | New | Notes |
---|---|---|
ca.uhn.fhir.jpa.subscription.channel.api.IChannelFactory | ca.uhn.fhir.broker.api.IBrokerClient | Creates producers and consumers |
org.springframework.messaging.MessageHandler | ca.uhn.fhir.broker.api.IMessageListener | In the new API Consumers and Listeners are always one-to-one |
org.springframework.messaging.Message | ca.uhn.fhir.rest.server.messaging.IMessage | ResourceModifiedJsonMessage used to inherit from Message now it inherits from IMessage |
IChannelReceiver | IChannelConsumer | IChannelConsumer are now always created with exactly one message listener |