[
https://issues.apache.org/jira/browse/CAMEL-23895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18093501#comment-18093501
]
Francesco Spampinato commented on CAMEL-23895:
----------------------------------------------
yes, correct! special chars like +/= without RAW were not correctly encoded.
> [camel-azure-servicebus] http 401 using connection string
> ---------------------------------------------------------
>
> Key: CAMEL-23895
> URL: https://issues.apache.org/jira/browse/CAMEL-23895
> Project: Camel
> Issue Type: Bug
> Components: camel-azure-servicebus
> Affects Versions: 4.21.0
> Reporter: Francesco Spampinato
> Priority: Minor
>
> Hi,
> if a create an azure service bus queue consumer in this way
> {code:java}
> from(azureServicebus("MyQueue")
> .connectionString("MyConnectionString"))
> .routeId("consumer")
> .log(LoggingLevel.INFO, LOG, ">> body: ${body}")
> .log(LoggingLevel.INFO, LOG, ">> header: ${headers}"); {code}
> connection to service bus queue fails with this error
> {code:java}
> Caused by: com.azure.core.amqp.exception.AmqpException: status-code: 401,
> status-description: InvalidSignature: The token has an invalid signature.,
> {code}
> Using same queue name and same connection string using plain azure sdk lib
> classes, connection is ok and i can consume messages without errors
> {code:java}
> ServiceBusProcessorClient processorClient = new ServiceBusClientBuilder()
> .connectionString("MyConnectionString")
> .processor()
> .queueName("MyQueue")
> .processMessage(Test::processMessage)
> .processError(Test::processError)
> .buildProcessorClient(); {code}
> azure sdk is the same in the two projects
> {code:java}
> <dependency>
> <groupId>com.azure</groupId>
> <artifactId>azure-messaging-servicebus</artifactId>
> <version>7.17.16</version>
> </dependency>{code}
> The connection string used is in this format
> {color:#cccccc}Endpoint=sb://myhost.servicebus.windows.net/;SharedAccessKeyName=test;SharedAccessKey=XXXXXXXXXXXXXXXXX{color}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)