Claus Ibsen created CAMEL-27876:
-----------------------------------
Summary: camel-azure-servicebus: an autowired processorClient
routes nothing, an autowired senderClient overrides the URI, credential
validation lets null through
Key: CAMEL-27876
URL: https://issues.apache.org/jira/browse/CAMEL-27876
Project: Camel
Issue Type: Bug
Components: camel-azure-servicebus
Reporter: Claus Ibsen
Fix For: 4.25.0
Found while improving the option descriptions of camel-azure-servicebus for
CAMEL-23832 (pull request https://github.com/apache/camel/pull/31149).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. An autowired processorClient routes nothing
{{ServiceBusConsumer.doStart}} only starts and stops a processorClient given by
the user; its messages go to the processMessage callback it was built with,
never to the route, and enableDeadLettering and lock renewal do not apply. The
option is @Metadata(autowired = true), so a single ServiceBusProcessorClient
bean in the registry (for example one from Spring Cloud Azure) makes every
azure-servicebus consumer route nothing.
Proposed change: drop autowired and deprecate the option, or take a
ServiceBusClientBuilder.
h4. 2. An autowired senderClient overrides the URI
senderClient is autowired the same way: a single ServiceBusSenderClient bean
sends every producer's messages to its own queue or topic, whatever the URI
names.
Proposed change: drop autowired.
h4. 3. Credential validation lets a missing credential through
{{ServiceBusUtils.validateConfiguration}} accepts fullyQualifiedNamespace
alone; credentialType then defaults to CONNECTION_STRING and the start fails in
the SDK with "'connectionString' cannot be null"; TOKEN_CREDENTIAL without a
tokenCredential reaches credential(fqns, null).
Proposed change: validate per credential type.
h4. 4. Smaller gaps
scheduleMessages discards the sequence numbers the SDK returns, so a scheduled
message cannot be cancelled from a route; the producer does not read the
CamelAzureServiceBusSessionId header; the
CamelAzureServiceBusApplicationProperties map is sent as is, without the
headerFilterStrategy.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)