Skip XDS export cleanly when exportCcdEndpoint is blank#111
Merged
Conversation
getExportCcdEndpoint() reads the property with no default, so it throws an APIException when unset. With no endpoint configured, every CREATED/UPDATED encounter event throws during export and is funnelled into the XDS.b error handler (or rethrown when none is set) - per-encounter error noise and error-queue growth, with no clean way to switch the outbound CCD push off. Guard the encounter listener: if xdssender.exportCcdEndpoint is blank, log and skip the export. Lets a deployment disable the outbound CCD push by clearing one property, mirroring santedb-mpiclient's empty mpi-client.endpoint.cr.addr behaviour. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
XdsSenderConfig.getExportCcdEndpoint()reads the property withgetProperty(name)(no default), which throwsAPIException("Property value … is not set")when the property is blank.So when a deployment has no export endpoint configured, every CREATED/UPDATED encounter event throws during export. The exception is only caught by the XDS.b error handler (or rethrown as a
RuntimeExceptionwhen none is configured) — i.e. a per-encounter error plus error-queue growth, with no clean way to switch the outbound CCD push off.Change
Guard
EncounterEventListenerat the top of the CREATED/UPDATED branch: ifxdssender.exportCcdEndpointis null/blank, log andreturn— skipping the export before any endpoint is read.This mirrors
santedb-mpiclient, where an emptympi-client.endpoint.cr.addrcleanly disables the patient feed. It gives deployments a one-property off-switch for the XDS export (useful when patient/clinical ingestion is handled by another path).Behaviour
exportCcdEndpointis configured.APIException, no error-queue entries.