Fix fhir-auth-tx: catch FHIR connection failures, refresh docs - #195
Open
Croway wants to merge 1 commit into
Open
Fix fhir-auth-tx: catch FHIR connection failures, refresh docs#195Croway wants to merge 1 commit into
Croway wants to merge 1 commit into
Conversation
The route only caught ProtocolException, but connection failures to the FHIR server actually surface as FhirClientConnectionException or RuntimeCamelException. Since those went uncaught, the file consumer never marked the input file as handled, causing it to be reprocessed on every poll forever. Broaden the onException clause to cover both, add a bounded redelivery policy with backoff, add a catch-all handler as a backstop, and set moveFailed on the file consumer as defense in depth. Also update the stale README, which still described the old hl7v2.patient/HL7v2 flow instead of the actual patients.csv + transaction Bundle flow, and pointed at a personal GitHub fork for the auth-enabled HAPI server. Replace it with a Docker Compose setup (HAPI FHIR server behind an nginx reverse proxy enforcing HTTP Basic auth) under fhir-auth-tx/containers, and point serverUrl at it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WKaCqZQd9uUiQR6QMZJkJ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fhir-auth-txroute only caughtProtocolException, but connection failures to the FHIR server actually surface asFhirClientConnectionException/RuntimeCamelException. Since those went uncaught, the file consumer never marked the input file as handled, causing it to be reprocessed on every poll indefinitely.onExceptionclause to cover the actual exceptions thrown, added a bounded redelivery policy with backoff, added a catch-all handler as a backstop, and setmoveFailedon the file consumer as defense in depth.hl7v2.patient/HL7v2 flow instead of the actualpatients.csv+ transaction Bundle flow, and pointed at a personal GitHub fork (rkorytkowski/hapi-fhir) for an auth-enabled HAPI server. Replaced it with a Docker Compose setup (HAPI FHIR JPA server behind an nginx reverse proxy enforcing HTTP Basic auth) underfhir-auth-tx/containers, and updatedserverUrlaccordingly.Test plan
mvn verifypasses for the module (existing mockedMyCamelApplicationTeststill green)docker-compose.yml(HAPI FHIR + nginx basic-auth proxy) and confirmed401without/with wrong credentials,200with correct onespatients.csv, confirmed the transaction Bundle was created successfully.camel/instead of looping forever🤖 Generated with Claude Code
https://claude.ai/code/session_016WKaCqZQd9uUiQR6QMZJkJ