Skip to content

[BUG] Service bus custom endpoint address #43555

@Anton0123

Description

@Anton0123

Describe the bug
The custom endpoint address is not merged from the namespace properties to producer/processor/consumer properties. This results in the custom endpoint address being null.

To Reproduce
Configure a custom endpoint address for the namespace but not for individual consumers or producers. The custom endpoint address will not be used when sending or receiving messages.

Code Snippet
Example configuration

spring:
  cloud:
    function:
      definition: consume;supply
    stream:
      bindings:
        consume-in-0:
          destination: sbq-test-1
        supply-out-0:
          destination: sbq-test-2
      binders:
        servicebus-0:
          type: servicebus
          default-candidate: true
          environment:
            spring:
              cloud:
                azure:
                  client:
                    amqp:
                      transport-type: amqp_web_sockets
                  servicebus:
                    custom-endpoint-address: https://test.address.com:443
                    namespace: sb-test-1
                    credential:
                      client-id: ${CLIENT_ID}
                      client-secret: ${CLIENT_SECRET}
                    profile:
                      tenant-id: ${TENANT_ID}
      servicebus:
        bindings:
          consume-in-0:
            consumer:
              entity-type: queue
          supply-out-0:
            producer:
              entity-type: queue

Expected behavior
I expect the custom-endpoint-address to be used by the consumers/producers/processors.

Screenshots
Image

Setup (please complete the following information):

  • OS: Windows 11
  • IDE: IntelliJ
  • Library/Libraries: com.azure.spring:spring-cloud-azure-stream-binder-servicebus:5.19.0
  • Java version: 22
  • App Server/Environment: -
  • Frameworks: Spring boot

Additional context
See com.azure.spring.messaging.servicebus.implementation.properties.merger, for example SenderPropertiesParentMerger. It does not map the custom endpoint address.
https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/spring-messaging-azure-servicebus/src/main/java/com/azure/spring/messaging/servicebus/implementation/properties/merger/SenderPropertiesParentMerger.java

Metadata

Metadata

Assignees

Labels

azure-springAll azure-spring related issuesazure-spring-servicebusSpring service bus related issues.customer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions