Apache Kafka for healthcare

Self-hosted Apache Kafka can carry HL7 and FHIR events between clinical systems inside your own network. This page covers the HIPAA safeguards, topic retention and FHIR server integration that shape the build.

On this page

Apache Kafka for healthcare: why clinical event streams need a planned build

A hospital or health platform team that wants clinical systems to exchange events without building a web of point-to-point interfaces can run self-hosted Apache Kafka in KRaft mode inside its own infrastructure. The design constraint is not throughput or tooling but electronic protected health information (ePHI), because every admission, order, result and discharge event that crosses the broker is ePHI that the organization must protect. Kafka itself is open source under the Apache License 2.0, so the cost question shifts from licensing to the people, hosting and controls the team provides around it.

Once Kafka carries clinical events, topics stop behaving like transient plumbing and start behaving like regulated data stores. Messages persist for the configured retention period, get copied to consumers and replicas, and can be read long after the source system has moved on. The HIPAA Security Rule (45 CFR Part 164 Subpart C) applies to a covered entity or business associate for all ePHI it creates, receives, maintains or transmits, so the broker cluster, its Connect workers, its schema tooling and its backups fall inside the same risk analysis as the EHR. Teams should confirm early whether the platform will be operated under a business associate agreement that meets 45 CFR 164.314(a)(2)(i), and who signs it.

That shift changes the planning work. Before the first topic is created, the team needs an inventory of which event types carry ePHI, a decision on which of them may be retained and for how long, and a mapping of which services and people may produce or consume each topic. Authentication, authorization and encryption in transit are configured per listener and per principal, so the access model has to be designed rather than inherited from a default. Retention, encryption at rest and audit evidence also become questions for the platform owner rather than for each application team. The rest of this page works through these decisions in the order a build needs them.

Which healthcare requirements shape the Kafka build

This table maps the healthcare rules most likely to affect a self-hosted Kafka build to what each one asks for and what it means for topics, access and cluster design. Read each row as a design input to settle before topics are created. Kafka itself does not make a deployment compliant, so the platform around it carries most of the evidence work.

RequirementSourceWhat it means for the Kafka build
HIPAA Security Rule scope and ePHI45 CFR 164.302Covered entities and business associates must protect ePHI they create, receive, maintain or transmit. Any topic, Connect pipeline or replica carrying patient data is in scope, including dead-letter and debug topics.
Unique user identification45 CFR 164.312, Appendix A to Subpart C (required)Each producer, consumer, connector and admin must authenticate as a distinct identity. Avoid shared service accounts and map Kafka principals to named workloads or people.
Emergency access procedure45 CFR 164.312, Appendix A to Subpart C (required)Document how authorized staff regain access to topics and the cluster during an outage, and who approves it. Test break-glass access before a real incident.
Automatic logoff45 CFR 164.312, Appendix A to Subpart C (addressable)Applies mainly to admin consoles, Connect UIs and monitoring tools that touch ePHI. Confirm session timeouts for each tool and document any equivalent alternative you choose.
Encryption and transmission security45 CFR 164.312, Appendix A to Subpart C (addressable)Kafka supports SSL/TLS between clients, brokers and tools, but security is optional. Enable TLS on every listener that carries ePHI and document how addressable encryption is assessed.
Business associate terms45 CFR 164.314(a)(2)(i)Any hosting, support or managed-service party that can reach ePHI in topics needs a contract requiring Security Rule compliance and incident reporting. Confirm subcontractor flow-down before granting access.
No HIPAA certificationHHS FAQ 2003No certificate proves HIPAA compliance, and HHS does not recognize private certifications. Ask for evidence of controls and be cautious with vendors who claim HIPAA certification.
Security Rule revision status90 FR 898; Unified Agenda RIN 0945-AA22A proposed revision was published in January 2025, but no final rule had been published as of October 2026. Design to the current rule and track the revision for changes.
GDPR Articles 32 and 34Regulation (EU) 2016/679Article 32 requires security suited to risk and Article 34 covers notifying individuals of breaches. The CNIL fined Hopital Prive de la Loire EUR 500,000 on 3 September 2026 for missing VPN, multi-factor authentication and need-to-know access control, so apply the same controls to Kafka access paths.
NIS2 health sector coverageDirective (EU) 2022/2555, Annex IHealth is listed as a sector of high criticality, including healthcare providers and medical device manufacturers. Confirm with counsel whether your organization falls in scope and what obligations apply to its streaming platform.

How HL7 and FHIR events move through Kafka topics

An ADT admission or discharge message or an order message usually starts in the EHR, passes through an integration engine that handles HL7 v2 framing, acknowledgments and routing, and then reaches a FHIR-facing producer that publishes events to Kafka. The producer is the place to translate a pipe-delimited HL7 v2 segment into a FHIR resource such as Encounter, ServiceRequest or Patient. HL7 v2 messages are event notifications carrying the fields that changed at one moment, while FHIR resources are the current state of an entity. Topic design should follow the clinical event boundary (an admission, a transfer, a lab order placed) rather than mirror the HL7 message type one to one, because consumers usually need the resource state, not the trigger. Consumers then write to a HAPI FHIR JPA server through its REST API, or feed other clinical systems, and each consumer group should keep its own offsets so a failed FHIR write does not block the others. The producer should also keep the original HL7 message identifier so every FHIR resource can be traced back to its source message.

Several details must be confirmed with the EHR vendor and the integration engine before topics are named. Ask which HL7 v2 message types and trigger events the EHR emits, whether it sends them over MLLP or through an interface engine only, and whether resend or replay is supported if a consumer falls behind. Confirm the patient identifier domain, because a Kafka key built on a local MRN can collide across facilities, and confirm whether the EHR already exposes FHIR endpoints that could make a separate producer unnecessary. Also confirm how the integration engine handles acknowledgments, so the team knows when a message is considered delivered and whether a Kafka outage can cause duplicate sends. Finally, record the version of each FHIR specification the consumers expect, since the HAPI FHIR JPA server supports DSTU2, DSTU3, R4, R4B and R5 and a resource written for one version may not validate against another.

Which Kafka modules and settings matter for clinical data

Authentication decides which identities can open a connection to a broker at all. Kafka supports SSL (certificate-based client identity) and SASL, and the documented SASL mechanisms are GSSAPI (Kerberos), PLAIN, SCRAM-SHA-256, SCRAM-SHA-512 and OAUTHBEARER. For clinical data, the choice usually follows the identity system your organization already operates, because a separate password store for Kafka becomes another credential lifecycle to audit.

  • Mutual TLS: Certificates give each service a distinct, revocable identity, which suits system-to-system feeds from clinical applications.
  • SASL SCRAM: Credentials live in the cluster metadata, so rotation and offboarding need a documented runbook.
  • Kerberos: Fits sites that already run Active Directory or FreeIPA and want one ticket-based identity for hosts and services.
  • OAUTHBEARER: Lets short-lived tokens from your identity provider authenticate clients, so review how token lifetime and revocation are handled.
  • Unsecured listeners: Kafka security is optional, so confirm that no plaintext listener remains open on a network segment that carries patient data.

Confirm with your security team which mechanism your identity provider supports cleanly, and document it per listener.

Setting retention limits for ePHI in topics

Topic retention is a privacy decision as well as a storage decision. In Kafka, a message stays in a topic for the retention window set by the topic configuration, whether or not any consumer has read it. During that window the message can be replayed by a new consumer group, and a MirrorMaker 2 flow can copy the topic, with its configuration, to another cluster. Each of those copies is a place where electronic protected health information (ePHI) lives. Retention limits should therefore be set per topic by the team that owns the data, with the clinical purpose written down first and the storage cost considered second. The settings to review are retention.ms and retention.bytes at the topic level, and cleanup.policy if a compacted topic is used for current state. Confirm the defaults on your cluster, because a topic created without explicit settings inherits the broker defaults.

Match the retention window to the clinical need. An order or result event that a downstream system must reprocess after an outage may need days, while a bulk feed used only to refresh a read model may need hours. Where feasible, separate identifiers from clinical payloads: publish a stable pseudonymous key or an opaque reference on the replayable topic and keep the directly identifying fields in a system that the FHIR server or the record system controls and audits. This reduces what a replay exposes and makes deletion requests easier to honor. Do not assume that compaction removes personal data, since older values remain in segments until they are cleaned, and tombstones only apply to keys you have chosen to delete. Plan the access model for replay separately from production access, using ACLs on the consumer group and topic so that only named services and roles can read history, and log replay sessions.

Under the HIPAA Security Rule, retention and replay controls map to technical safeguards such as access control and audit controls, and several of the related implementation specifications are addressable rather than required. For each addressable specification, the covered entity or business associate must assess whether it is reasonable and appropriate, document the decision if it is not adopted, and implement an equivalent alternative where one is reasonable. Record the retention rationale, the replay approval process and the reasoning for any alternative in the risk analysis and in your documentation for the Kafka platform. Confirm with your privacy and security officers which data classes qualify as ePHI in your environment, and confirm the current requirements with the HHS HIPAA Security Rule guidance and your counsel.

How a healthcare Kafka rollout is sequenced

This sequence moves a healthcare Kafka platform from role and data-flow decisions to a production cutover, with each phase closing on a written output that compliance, security and clinical integration owners can review. Each phase adds one control layer, so ePHI reaches a topic only after the safeguards around it have been tested.

  1. Scope the covered entity or business associate role

    Decide whether your organization acts as a covered entity, a health care clearinghouse or a business associate for each data flow, because that role determines which Security Rule obligations apply to the messages. Map every producer, consumer, FHIR server and external party that touches ePHI, and record which HL7 v2 or FHIR messages carry patient identifiers. You provide the systems inventory, interface specifications and the named clinical and operational owners. The step closes with a data-flow diagram and a signed list of the topics that will hold ePHI.

  2. Confirm the risk analysis and business associate terms

    Confirm that the risk analysis covers the brokers, Connect workers, topics and FHIR server in scope, as the administrative safeguards in 45 CFR 164.308 require. Check that each business associate contract meets 45 CFR 164.314(a)(2)(i), which requires Security Rule compliance, flow-down of the same terms to subcontractors that handle ePHI, and reporting of security incidents. Your privacy and legal teams own these documents, and DeployOpen reviews the technical controls they reference. The step closes when every component and hosting or support vendor appears in the risk analysis with contract language on file.

  3. Build a non-production cluster with TLS and ACLs

    Deploy a KRaft cluster in a non-production environment with SSL/TLS on every client, broker and tool listener, and choose a SASL mechanism with the identity team from GSSAPI, PLAIN, SCRAM-SHA-256, SCRAM-SHA-512 or OAUTHBEARER. Give each application and person a unique identity, and define ACLs with the StandardAuthorizer, keeping allow.everyone.if.no.acl.found set to false so unmapped resources stay restricted to super users. The step closes with tests showing that unauthenticated clients are refused, that unauthorized topic access fails, and that only secured listeners are exposed.

  4. Integrate one feed with a FHIR server

    Select one feed, such as admission or lab result messages, and route it through a topic into a HAPI FHIR JPA server. For production, use PostgreSQL or Microsoft SQL Server, since the starter supports those databases and does not support MySQL, and reserve the embedded H2 default for testing. HAPI FHIR provides building blocks, including the AuthorizationInterceptor, consent interceptors and BALP audit logging, but it does not supply a complete security layer, so you design the access model. Clinical owners provide the resource mapping and minimum data set. The step closes when one feed passes from source to FHIR server with validated resources and enforced access in the test environment.

  5. Test audit logging and access controls

    Test the technical safeguards in 45 CFR 164.312 against the feed, including unique user identification, the emergency access procedure, automatic logoff and encryption. For any addressable specification you do not implement as written, document the reason and the equivalent measure, as 45 CFR 164.306(d) requires. Confirm that broker authorization events and FHIR access events, including BALP records, reach a log store you control and that a reviewer can trace a single patient access end to end. The step closes with a test report that maps each result to the safeguard it supports.

  6. Add cross-site replication and cut over

    Configure MirrorMaker 2 on Kafka Connect to replicate topics with their configuration, consumer group offsets and ACLs between clusters, which preserves partitioning. Before any ePHI moves, verify the replicated ACLs, encryption and access controls at the second site, and rehearse failover with the clinical owners. You provide the second-site infrastructure, network path and change windows, and agree the rollback criteria in advance. The step closes with a signed cutover record and an operations runbook that covers retention limits, backup and incident contacts.

Compliance evidence to plan before go-live

A Kafka cluster that carries ePHI is one part of a larger compliance record. The cards below cover the frameworks and documents that shape what you must be able to show, from the HIPAA risk analysis to EU rules that apply when patient data crosses borders. DeployOpen prepares systems, controls and evidence for assessment, but independent auditors and certification bodies issue any attestations.

HIPAA risk analysis and documentation

The Security Rule requires covered entities and business associates to assess risks to ePHI and to document their policies and procedures. For a Kafka deployment, the analysis should cover every topic that carries patient data, the producers and consumers that touch it, broker storage, backups and the network paths between clinical systems. Record which implementation specifications you treat as addressable, why, and what equivalent measure you chose. Confirm the current text of 164.306 and 164.316 with your counsel before you rely on it.

NIST SP 800-66 Rev. 2 as guidance

NIST SP 800-66 Revision 2, published in February 2024, is a resource guide for implementing the Security Rule. It gives key activities and sample questions for each standard, which helps structure the Kafka control set and the evidence you collect. HHS lists it as informational rather than legally binding, so it supports your analysis but does not replace the regulation. Map its questions to your topic-level ACLs, TLS settings and audit logs before the first assessment.

Pending 2025 Security Rule revision

HHS proposed a major Security Rule revision on January 6, 2025, and as of October 2026 no final rule has been published. The Unified Agenda projects final action for July 2027, so the requirements may change during or after your build. Track the rulemaking and review your Kafka control design, including encryption and authentication requirements, once a final rule is published. Ask your compliance lead which version of the rule your risk analysis will cite.

HITRUST as optional assessment

HIPAA has no certification. HHS does not recognize private certifications, and they do not prevent a later enforcement finding. HITRUST is a voluntary framework that some customers and partners request as an assessment, and its assessments are performed by authorized assessors. Decide whether you need one before go-live, confirm which assessment type and version your partners accept, and plan Kafka evidence against the relevant control specifications rather than assuming the platform carries that status.

GDPR and EHDS for EU deployments

Where Kafka carries health data of people in the EU, GDPR Articles 32 and 34 shape security and breach communication duties. A 2026 CNIL fine against a French hospital cited missing VPN and multi-factor authentication for external access and access control that ignored care team need-to-know. The European Health Data Space regulation adds obligations for health data exchange. Confirm with counsel how these apply to your cross-border topics and replication links.

21 CFR Part 11 where applicable

Part 11 of Title 21 covers electronic records and signatures for FDA-regulated activities, such as records supporting clinical trials or manufacturing. A healthcare integration bus does not fall under it by default. Confirm whether any topic or audit trail supports an FDA-regulated record. If it does, plan validation, audit trail retention and signature controls for that path only, and keep it separate from general clinical message flow.

What health organizations ask before a Kafka build

What drives the cost and effort of a healthcare Kafka build?

The main drivers are the number of source and target systems, how many HL7 v2 feeds, FHIR resources and EHR interfaces must be mapped, and how much of the platform is new work versus configuration. Cost also rises with the number of sites, the depth of access control and audit logging you need, and the amount of data-contract and testing work with clinical teams. Costs fall when the data flow inventory is complete before work starts. Ask any quote to break out design, build, security hardening, testing, documentation and handover as separate line items, and to state which hosting, licensing and staffing costs you carry directly. Kafka itself is licensed under Apache-2.0, so the recurring cost is infrastructure and people, not a software fee.

How long does a healthcare Kafka rollout take?

Duration depends mainly on how many interfaces must move, how mature your EHR and integration engine vendor relationships are, and how long security and clinical sign-off takes. A single-site pilot with a few well-documented feeds moves faster than a multi-site rollout that touches several EHR instances. Schedule risk usually sits in vendor response times, test environment access and approvals for changes to patient data flows, not in Kafka configuration. Ask for a timeline tied to written milestones and dependencies, and check whether it assumes client-provided test data and environments. Fixed-scope engagements are agreed in writing before work starts, so the timeline should follow from that agreed scope.

What must our team supply before a Kafka project starts?

Plan to provide three inputs at minimum. First, a data flow inventory listing each producer, consumer, message type (HL7 v2, FHIR resources or other formats), volume, latency needs and owner. Second, contacts and access paths for each EHR and interface engine vendor, including test environments and change windows. Third, your written security policy, covering identity, encryption, logging, retention and incident response, so that topic access, TLS and ACLs match what your compliance function already requires. Also ask who approves data classification for each topic and who owns retention decisions. Gaps in these inputs are the most common reason healthcare integration timelines slip.

Can our in-house team build and run a healthcare Kafka platform?

Some teams can, especially those already operating Kafka, a FHIR server or an integration engine, and with staff who understand both HL7 and clinical workflows. The skills that are harder to hire for are KRaft cluster operations, TLS and SASL configuration, ACL design, and evidence collection for audits. Consider whether your team can carry on-call duties, version upgrades (Kafka 4.x requires Java 17 for brokers) and the work of keeping security controls current. A useful test is whether you can staff the build and the first year of operations without pulling the same people off clinical integration work. A partner can cover part of the build while your team learns the platform, which is often where the ownership question gets decided.

Does running Kafka make us HIPAA compliant?

No. The HIPAA Security Rule applies to covered entities and business associates for the electronic protected health information they handle, and it is a set of standards and implementation specifications that your organization must apply across people, processes and technology. Kafka can support several technical safeguards, such as unique user identification through authentication, encryption in transit with TLS, and access control with ACLs, but the rule also requires risk analysis, workforce policies, incident procedures, and documentation. There is no HIPAA certification, so be cautious of any vendor claiming one. Your auditors and the HHS Office for Civil Rights will look at your evidence, not at the tool.

What does the HIPAA penalty range mean for planning?

For penalties assessed on or after January 28, 2026, the inflation-adjusted civil money penalty ranges from $145 per violation with no knowledge to $2,190,294 per violation for uncorrected willful neglect, with a calendar-year cap of $2,190,294 (45 CFR 102.3, 91 FR 3666). For planning, the practical point is that exposure depends on the tier of culpability and how quickly violations are corrected, so documented controls and prompt remediation matter as much as the design itself. Budget for security controls, testing and evidence collection as part of the Kafka build, not as an afterthought. Ask any partner how they document risk decisions for addressable specifications, since 45 CFR 164.306(d) requires a documented rationale when an addressable specification is not implemented as written.

Is the HIPAA Security Rule changing soon?

HHS proposed a major Security Rule revision on January 6, 2025 (90 FR 898, RIN 0945-AA22), with comments due March 7, 2025. As of October 2026, no final rule has been published, and the latest Unified Agenda lists final action as projected for July 2027. Until a final rule is published, design against the current codified rule at 45 CFR Part 164 Subpart C, and keep your Kafka controls documented so they can be mapped to any revised requirements. Ask your partner how the design will be reviewed when the rule changes, and who in your organization owns that review.

What to ask a partner before signing a healthcare Kafka scope

Start with the business associate question, because it decides whether a partner can touch ePHI at all. Under 45 CFR 164.314(a)(2)(i), a business associate contract must require the partner to comply with the Security Rule, flow the same terms down to any subcontractor that handles ePHI, and report security incidents, including breaches of unsecured PHI, to the covered entity. Ask for the partner's standard business associate agreement before scope is discussed, confirm who in the partner signs it, and confirm which subcontractors (hosting, backup, support tooling) would see message payloads. If a subcontractor cannot accept the same terms, the scope needs to change before work starts. Also confirm that the partner's staff with access to your clusters are named in the contract.

Next, ask how ePHI is kept out of places it should not reach. Kafka payloads are often HL7 or FHIR resources, so the partner should explain how broker logs, Connect worker logs, debug output, dead letter topics and monitoring labels are configured to exclude message bodies and identifiers. Ask whether test data is synthetic or de-identified, who approves any copy of production messages into a lower environment, and how that copy is deleted. Ask how the security incident process runs in practice: who triages an alert, how quickly the partner notifies you, and which evidence it preserves. Confirm that the contract's reporting terms match your own incident response obligations to the covered entity.

Then ask the operational questions. Confirm who holds the cluster administrator credentials, where they are stored, and whether the partner's engineers use named accounts with authorization rules and logged sessions rather than shared secrets. Ask how upgrades will be tested against the supported 4.x releases listed on the Kafka downloads page, including rolling upgrades from the last three releases, and whether a test cluster with representative topics, consumers and ACLs will be used before production. Finally, ask for the evidence package: configuration baselines, ACL exports, TLS and SASL settings, backup and restore test results, and the access review record. DeployOpen prepares these artifacts for your assessors, but it does not issue audit reports or certifications, so confirm which independent body will review them.

How DeployOpen scopes and delivers healthcare Kafka work

DeployOpen plans, implements, hardens, documents and supports self-hosted Apache Kafka inside your own cloud accounts, data centers or air-gapped networks. For healthcare, the work starts with the clinical systems, data flows and ePHI boundaries that the cluster must serve, and the design is agreed in writing before any build begins.

How we scope

  • Inventory the clinical and administrative systems that publish or consume HL7 and FHIR events, and record which topics may carry ePHI.
  • Agree in writing the KRaft cluster layout, topic and partition plan, retention limits and access model for each healthcare data flow.
  • Confirm with your compliance and legal teams which business associate terms and HIPAA addressable decisions apply to the platform.

How we build

  • Configure TLS and SASL authentication, ACLs in the KRaft metadata log and FHIR server access controls before any clinical data flows.
  • Build producers, consumers and FHIR server integrations, then test topic-level access, encryption in transit and retention behavior against the agreed design.
  • Document the security configuration, data flow diagrams and the evidence each control produces so your team can review it independently.

How we hand over

  • Deliver runbooks for broker operations, certificate rotation, user onboarding, upgrades and backup and restore of the cluster and FHIR database.
  • Walk your operations and security staff through monitoring, audit logging and incident response steps tied to the healthcare data flows.
  • Hand over the configuration, scripts and infrastructure code in your repositories, with a written list of open items and owner assignments.

How we support

  • Engagements are fixed-scope, and ongoing support, upgrades and continuous testing are available as a retainer, agreed separately from the build.
  • Plan Kafka upgrades and FHIR server version changes as scheduled work, checked against the release notes and your change control process.
  • Run security testing of the Kafka and FHIR layers on a schedule you approve, with findings tracked to remediation in your environment.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.