Is it possible to use Spring Cloud Azure Stream Binder with a proxy?

Tobias Moster 1 Reputation point
2020-11-12T10:26:17.977+00:00

I want to connect to the Azure Service Bus Messaging Queue via a Proxy Server. I use the Stream Binder lib in my Spring application

pom.xml:

...
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>spring-cloud-azure-servicebus-queue-stream-binder</artifactId>
<version>1.2.8</version>
</dependency>
...
application.yml

...
spring.cloud.azure.servicebus.connection-string: Endpoint=sb://examplehost.servicebus.windows.net/...
spring.cloud.stream.bindings.input.destination: somedestination
spring.cloud.stream.servicebus.queue.bindings.input.consumer.checkpoint-mode: MANUAL
...
I have tried to provide HTTP and SOCKS proxy settings via command line arguments, but this does not seem to work. Is it possible to provide a SOCKS or HTTP Proxy for the connection to "examplehost.servicebus.windows.net" ?

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
553 questions
Azure Spring Apps
Azure Spring Apps
An Azure platform as a service for running Spring Boot applications at cloud scale. Previously known as Azure Spring Cloud.
110 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Khurram Rahim 1,841 Reputation points
    2020-11-12T10:36:57.087+00:00

    you may refer this article

    https://github.com/microsoft/spring-cloud-azure/issues/638

    please accept answer if issue resolve

    0 comments No comments

  2. Krish G 2,326 Reputation points
    2020-12-01T08:06:39.267+00:00

    Not exactly sure about why proxy is in the picture of your scenario since both Azure Spring cloud application and Service bus would be in Azure environment. If by any chance, you meant your app is not Azure hosted and behind a proxy, then you might want to have look at
    https://spring.io/guides/gs/routing-and-filtering/
    https://stackoverflow.com/questions/30168113/spring-boot-behind-a-network-proxy

    0 comments No comments