Repository navigation
chore: the FHIR, OGC API, Splunk HEC and SNMP Kamelets take timeouts and more endpoint options (#3170) - #3228
Merged
Conversation
…and more endpoint options (apache#3170) fhir-sink takes connectionTimeout, socketTimeout, compress, summary and validationMode. fhir-source takes delay, accessToken and an HTTP proxy (proxyHost, proxyPort, proxyUser, proxyPassword); its username and password are no longer required, so it works with a server without login and with an access token alone (with both set, HAPI sends two Authorization headers). ogcapi-features-action takes connectTimeout and responseTimeout. splunk-hec-sink takes splunkEndpoint, to send to the raw endpoint. snmp-source takes snmpTimeout (mapped to the timeout option of the component, as timeout is taken by the kamelet: component), retries, initialDelay and snmpContextName. All new options are optional placeholders without a default, so with them unset the endpoint URIs are the same as before. Secrets go into RAW(); splunkEndpoint and snmpContextName have a pattern. nominatim-geocode-action gets no language option: the Nominatim producer of the Camel geocoder component does not use its language option, so this needs a Camel change first. Each option was checked against HAPI FHIR, Splunk with HEC, net-snmp and a recording HTTP server; the descriptions and the partial pages say what the tests showed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
davsclaus
force-pushed
the
ci-issue-3170-misc-a
branch
from
November 18, 2026 19:59
5fa86ce to
beabec8
Compare
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.
Part of #3170:
fhir-sinktakes timeouts, compression,summaryandvalidationMode;fhir-sourcetakes adelay, an OAuth access token and a proxy, and no longer requiresusernameandpassword;ogcapi-features-actiontakes timeouts;splunk-hec-sinkcan send to the raw endpoint;snmp-sourcetakes a timeout, retries, an initial delay and an SNMP v3 context.The options
fhir-sinkconnectionTimeoutconnectionTimeout={{?connectionTimeout}}fhir-sinksocketTimeoutsocketTimeout={{?socketTimeout}}fhir-sinkcompresscompress={{?compress}}Content-Encoding: gzip.fhir-sinksummarysummary={{?summary}}_summaryparameter to every request, so the server answers with a short form. EnumCOUNT,TEXT,DATA,TRUE,FALSE.fhir-sinkvalidationModevalidationMode={{?validationMode}}NEVERskips the read of/metadatabefore the first message. EnumNEVER,ONCE.fhir-sourcedelaydelay={{?delay}}fhir-sourceaccessTokenaccessToken=RAW({{?accessToken}})Authorization: Bearer. Secret.fhir-sourceproxyHost,proxyPortproxyHost={{?proxyHost}},proxyPort={{?proxyPort}}fhir-sourceproxyUser,proxyPasswordproxyUser=RAW({{?proxyUser}}),proxyPassword=RAW({{?proxyPassword}})ogcapi-features-actionconnectTimeoutconnectTimeout: "{{?connectTimeout}}"ogcapi-features-actionresponseTimeoutresponseTimeout: "{{?responseTimeout}}"splunk-hec-sinksplunkEndpointsplunkEndpoint: "RAW({{?splunkEndpoint}})"/services/collector/raw, with optional query parameters.pattern: ^/[^\s]*$.snmp-sourcesnmpTimeouttimeout: "{{?snmpTimeout}}"timeout, which thekamelet:component takes (#3201).snmp-sourceretriesretries: "{{?retries}}"snmp-sourceinitialDelayinitialDelay: "{{?initialDelay}}"snmp-sourcesnmpContextNamesnmpContextName: "RAW({{?snmpContextName}})"pattern: ^[^\s]+$.default, as in chore: mail-sink can use STARTTLS (#3170) #3174. When they are unset, the optional placeholders drop them, and the endpoint URIs are identical tomain's.fhir-sourceusernameandpasswordare no longer required. They were required, so a server without login needed dummy values, and anaccessTokencould not be used alone: with both set, HAPI sends twoAuthorizationheaders (BasicandBearer), which the test below shows. Their mapping changed from{{username}}to{{?username}}(still inRAW()); a configuration that sets them works as before.fhir-sink: its proxy andaccessTokenoptions were already there; the issue listed them forfhir-source.nominatim-geocode-action: no language option. The Camelgeocodercomponent has alanguageoption, but its Nominatim producer does not use it: it builds thesearchrequest itself (q,format,addressdetails,limit) with its own HTTP client, and sends neither anaccept-languageparameter nor theAccept-Languageheader of the message. A test withlanguage=frand anAccept-Language: frheader showed neither in the request.serverUrlcannot carry it either, as the producer appends/searchto it. This needs a change in Camel first (the Nominatim producer passinglanguageasaccept-language), then the Kamelet can map it./metadataread and the 10-second timeouts offhir-sink; the login choices offhir-source; the timeouts ofogcapi-features-action; the event and raw endpoints ofsplunk-hec-sink; what happens to a poll the device does not answer insnmp-source.fhir-sink,fhir-source,snmp-sourceandsplunk-hec-sinkhave a new section with an example;ogcapi-features-actiongets a partial page, with an example of the timeouts.Verification
Tested with Camel JBang 4.24.0-SNAPSHOT:
hapiproject/hapi:v8.12.0-2, with a small recording HTTP server in front of it (a reverse proxy that logs each request with its headers, or an HTTP forward proxy that asks for a login with 407).splunk/splunk:latestwith HEC enabled (SPLUNK_START_ARGS=--accept-license,SPLUNK_HEC_TOKEN), searched through its REST API.snmpd, with a v1/v2c community, an SNMP v3 user and a contextvrfblue(aproxy -Cn vrfbluethat maps1.3.6.1.4.1.9999.1to the system group). Thepolinux/snmpdand Alpinenet-snmpcontainers answered from inside Docker but not through the published UDP port on Docker Desktop for Mac, so the agent ran as thesnmpdof macOS (net-snmp 5.6) on127.0.0.1:16161. A UDP listener on a port without an agent recorded the polls that were not answered.mainand this branchcamel get endpointshows identical URIsfhir://CREATE/resource?compress=true&connectionTimeout=4000&…&socketTimeout=7000&summary=DATA&validationMode=NEVERandsnmp://…?initialDelay=…&retries=0&snmpContextName=RAW(vrfblue)&…&timeout=500fhir-sinkunsetGET /fhir/metadata, thenPOST /fhir/Patient?_format=json, noContent-Encodingfhir-sinkcompress: true,summary: DATA,validationMode: NEVER/metadata;POST /fhir/Patient?_format=json&_summary=datawithContent-Encoding: gzip; HAPI created the Patient (201)fhir-sinksummaryunset /TRUE, Patient with text and a photoSUBSETTED. A read of the Patient created withTRUEhas its photo and textfhir-sinkconnectionTimeoutunset /2000, server10.255.255.1ConnectTimeoutExceptionfhir-sinksocketTimeoutunset /2000, server answering after 5 sSocketTimeoutException: Read timed outfhir-sinkvalidationModeunset /NEVER, server without/metadataHAPI-1357: Failed to retrieve the server metadata statement/ the Patient is sentfhir-sourcewithoutusernameandpassword,main/ this branchmandatory parameters must be provided: username, password/ searches, noAuthorizationheaderfhir-sourcedelayunset /3000fhir-sourceaccessToken: tok-abc.123Authorization: Bearer tok-abc.123fhir-sourceaccessTokenwithusernameandpasswordAuthorizationheaders,Basic dTpwandBearer tok-abc.123fhir-sourceusernameandpassword,mainand this branchAuthorization: Basic dTpwon bothfhir-sourceaccessToken: "tok+a b%20&x=1"Bearer tok+a b%20&x=1fhir-sourceproxyHost/proxyPortto a proxy asking for a login, noproxyUserHTTP 407 Proxy Authentication RequiredproxyUser: pu,proxyPassword: ppProxy-Authorization: Basic cHU6cHA=; the Bundles come through. Without the proxy options, the proxy sees nothingogcapi-features-actionunsetresponseTimeoutunset /2000, service answering after 5 sSocketTimeoutException: Read timed outconnectTimeout2000, service10.255.255.1ConnectTimeoutExceptionconnectTimeoutunset, service10.255.255.1responseTimeoutunset, service answering after 400 sSocketTimeoutException: Read timed outnominatim-geocode-actionstand-in, Camelgeocoderwithlanguage=frand a message headerAccept-Language: frGET /search?q=…&addressdetails=1&format=jsonv2&limit=1, withoutaccept-languageand without anAccept-Languageheader; no option addedsplunk-hec-sinksplunkEndpointunset //services/collector/eventmainwith sourcew5-…and source typecamel; the event is{"headers":{"Order":"42"},"body":"hello-…"}splunkEndpoint: /services/collector/rawhttp:splunk_hec_token, source typehttpevent; the event is the whole JSON object, withindex,sourceandeventinside itsplunkEndpoint: /services/collector/raw?sourcetype=_json&source=w5-rawq-queryw5-rawq-query, source type_json: the query parameters (with?and&, kept byRAW()) reach SplunksplunkEndpoint: /services/collector/raw?index=summary&sourcetype=_json,index: mainsummarysplunkEndpoint: /services/collector/nopeHTTP/1.1 404 Not Foundsnmp-sourceunsetsysNameinitialDelay: 5000snmpTimeoutandretriesunsetsnmpTimeout: 500,retries: 0snmpTimeout: 500,retries: 4snmpTimeout: 3000,retries: 11.3.6.1.4.1.9999.1.5.0,snmpContextNameunset /vrfblue/nosuchnoSuchObject/w5misca-snmpd/noSuchObjectsnmpContextName: vrfbluenoSuchObject: the context is only sent with v3./mvnw clean verify -DskipTestsand then./mvnw clean verifypassed from the root, includingKameletsCatalogTestandCatalogValidatorTest. Before building, the library copies of the five Kamelets were refreshed with./mvnw -pl library/camel-kamelets resources:copy-resources@copy-resource-one. The build regeneratedkamelets-index.json. The partial pages have no unescaped${.Claude Code on behalf of Claus Ibsen
🤖 Generated with Claude Code