Skip to content

Skip XDS export cleanly when exportCcdEndpoint is blank#111

Merged
mherman22 merged 1 commit into
mainfrom
fix/skip-export-when-endpoint-blank
Jun 22, 2026
Merged

Skip XDS export cleanly when exportCcdEndpoint is blank#111
mherman22 merged 1 commit into
mainfrom
fix/skip-export-when-endpoint-blank

Conversation

@mherman22

Copy link
Copy Markdown
Contributor

Problem

XdsSenderConfig.getExportCcdEndpoint() reads the property with getProperty(name) (no default), which throws APIException("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 RuntimeException when 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 EncounterEventListener at the top of the CREATED/UPDATED branch: if xdssender.exportCcdEndpoint is null/blank, log and return — skipping the export before any endpoint is read.

This mirrors santedb-mpiclient, where an empty mpi-client.endpoint.cr.addr cleanly 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

  • No change when exportCcdEndpoint is configured.
  • When blank: encounters are skipped quietly (info log) — no APIException, no error-queue entries.
  • Listener stays async (JMS); the existing try/catch is unchanged.

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>
@mherman22 mherman22 merged commit cc53afc into main Jun 22, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant