You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrea Cosentino (Jira)" <ji...@apache.org> on 2026/09/17 07:55:00 UTC
[jira] [Updated] (CAMEL-24766) camel-huaweicloud-smn: empty-body guard checks the raw endpoint operation instead of the resolved one
[ https://issues.apache.org/jira/browse/CAMEL-24766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrea Cosentino updated CAMEL-24766:
-------------------------------------
Fix Version/s: 4.23.0
> camel-huaweicloud-smn: empty-body guard checks the raw endpoint operation instead of the resolved one
> -----------------------------------------------------------------------------------------------------
>
> Key: CAMEL-24766
> URL: https://issues.apache.org/jira/browse/CAMEL-24766
> Project: Camel
> Issue Type: Bug
> Reporter: Andrea Cosentino
> Assignee: Andrea Cosentino
> Priority: Major
> Fix For: 4.23.0
>
>
> In SimpleNotificationProducer.validateServiceConfigurations the empty-body guard tests simpleNotificationEndpoint.getOperation() (the raw endpoint operation), but the operation actually dispatched is resolved a few lines later as the CamelHwCloudSmnOperation exchange property first, endpoint param as fallback. Consequences (verified against main): (a) if the operation is supplied only via the SMN_OPERATION property and the endpoint operation is left unset, the guard does null.equals(...) and throws a raw NullPointerException on any empty-body exchange; (b) if the endpoint operation is publishAsTemplatedMessage but the property overrides it to publishAsTextMessage, the guard checks the wrong value, does not fire, and an empty text message is published. The literal "publishAsTextMessage" is also hardcoded instead of SmnOperations.PUBLISH_AS_TEXT_MESSAGE. Fix: resolve the operation (property-or-endpoint) before the body check and compare the resolved value against the constant. Also: the topic URN is built from endpoint.getRegion() unconditionally, yielding urn:smn:null:... when a user configures endpoint without region; and withTimeToLive(...) is set twice in the templated-message branch (harmless copy-paste).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)