Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service bus - Spring Cloud Stream to use proxy for connection #25485

Closed
preethamjebarajjohn opened this issue Nov 17, 2021 · 6 comments
Closed
Assignees
Labels
azure-spring All azure-spring related issues Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@preethamjebarajjohn
Copy link

preethamjebarajjohn commented Nov 17, 2021

I am looking for an option to set proxy for connecting to Service bus using "Spring cloud Streams". Below is my configuration and error logs. I can able to connect to same service bus topic using ServiceBusReceiverAsyncClient by setting proxy. I am looking to achieve this by using Cloud Stream.

spring:
  cloud:
    azure:
      servicebus:
        connection-string: Endpoint=sb://namespace.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=XXXXXXX
    stream:
      bindings:
        consume-in-0:
          destination: XXXXX
          group: XXXXXX
      servicebus:
        topic:
          bindings:
            consume-in-0:
              consumer:
                checkpoint-mode: MANUAL
      function:
        definition: consume;
      poller:
        fixed-delay: 1000
        initial-delay: 0

Error Logs:

21-11-16 Tue 11:48:48.352 DEBUG 44993b2bb111c24e ReactorExecutor                          : Had more tasks to process on reactor but it is shutting down.
21-11-16 Tue 11:48:48.352 INFO  44993b2bb111c24e ReactorDispatcher                        : connectionId[MF_853c41_1637081310280] Reactor selectable is being disposed.
21-11-16 Tue 11:48:48.353 INFO  44993b2bb111c24e ReactorConnection                        : Shutdown signal received from reactor provider.
21-11-16 Tue 11:48:48.353 INFO  44993b2bb111c24e ReactorConnection                        : onConnectionShutdown connectionId[MF_853c41_1637081310280], hostName[ici-namespace.servicebus.windows.net], message[Shutting down], shutdown signal[false]
21-11-16 Tue 11:48:48.353 DEBUG 44993b2bb111c24e ReactorExecutor                          : Completing close and disposing scheduler. Finished processing pending tasks.
21-11-16 Tue 11:48:48.356 ERROR 44993b2bb111c24e Operators                                : Operator called default onErrorDropped
reactor.core.Exceptions$ErrorCallbackNotImplemented: com.azure.core.amqp.exception.AmqpException: errorContext[NAMESPACE: namespace.servicebus.windows.net. ERROR CONTEXT: N/A]
Caused by: com.azure.core.amqp.exception.AmqpException: errorContext[NAMESPACE: namespace.servicebus.windows.net. ERROR CONTEXT: N/A]
	at com.azure.core.amqp.implementation.ExceptionUtil.toException(ExceptionUtil.java:85) ~[azure-core-amqp-2.3.2.jar:2.3.2]
	at com.azure.core.amqp.implementation.handler.ConnectionHandler.notifyErrorContext(ConnectionHandler.java:325) ~[azure-core-amqp-2.3.2.jar:2.3.2]
	at com.azure.core.amqp.implementation.handler.ConnectionHandler.onTransportError(ConnectionHandler.java:228) ~[azure-core-amqp-2.3.2.jar:2.3.2]
	at org.apache.qpid.proton.engine.BaseHandler.handle(BaseHandler.java:191) ~[proton-j-0.33.8.jar:na]
	at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:108) ~[proton-j-0.33.8.jar:na]
	at org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:324) ~[proton-j-0.33.8.jar:na]
	at org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:291) ~[proton-j-0.33.8.jar:na]
	at com.azure.core.amqp.implementation.ReactorExecutor.run(ReactorExecutor.java:86) ~[azure-core-amqp-2.3.2.jar:2.3.2]
	at org.springframework.cloud.sleuth.instrument.reactor.ReactorSleuth.lambda$null$6(ReactorSleuth.java:312) ~[spring-cloud-sleuth-instrumentation-3.0.4.jar:3.0.4]
	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) ~[reactor-core-3.4.11.jar:3.4.11]
	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) ~[reactor-core-3.4.11.jar:3.4.11]
	at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) ~[na:1.8.0_302]
	at java.util.concurrent.FutureTask.run(FutureTask.java) ~[na:1.8.0_302]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[na:1.8.0_302]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[na:1.8.0_302]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_302]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_302]
	at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_302]
@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Nov 17, 2021
@pallavit pallavit added the Client This issue points to a problem in the data-plane of the library. label Nov 18, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Nov 18, 2021
@pallavit
Copy link
Contributor

/cc: @conniey could you please take a look.

@chenrujun chenrujun added the azure-spring All azure-spring related issues label Nov 18, 2021
@ghost ghost added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Nov 18, 2021
@chenrujun chenrujun added this to the Backlog milestone Nov 18, 2021
@chenrujun
Copy link

Hi, @yiliuTo , could you please handle this issue?

@yiliuTo
Copy link
Member

yiliuTo commented Nov 23, 2021

Hi @preethamjebarajjohn , the proxy configuration for service bus spring cloud stream binder is only supported from the latest release of spring-cloud-azure-stream-binder-servicebus 4.0.0-beta.2.
In 4.0.0-beta.2 and future versions, we support three levels of configurations:

  1. You could set the overall proxy by the configuration options of spring.cloud.azure.servicebus.proxy.*, which will be applied with all producer and consumer clients. Detailed proxy configuration options include: https://microsoft.github.io/spring-cloud-azure/docs/current/reference/html/index.html#azure-common-configuration-options-5
  2. Also you could choose set different proxy for consumer/produer with spring.cloud.azure.servicebus.processor.proxy.* and spring.cloud.azure.servicebus.producer.proxy.*. If configured, this will override the above one.
  3. You could choose to set different proxy for each consumer/procuder client when you have multiple consumers/producers, with the properties of spring.cloud.stream.servicebus.bindings.<binding-name>.consumer.proxy.* and spring.cloud.stream.servicebus.bindings.<binding-name>.producer.proxy.*. Also this will override the above ones.

Also, due to this is only a beta version, it's not recommanded to used in production env, you could look forward to our GA release which is planned to be published around December 20, 2021. Thanks.

@yiliuTo
Copy link
Member

yiliuTo commented Jan 4, 2022

Hi @preethamjebarajjohn , due to some interval plans, we didn't release the GA version of 4.0.0 in December, you could subscribe to this issue to track the GA release plan. #24327

@yiliuTo yiliuTo added the issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. label Jan 4, 2022
@ghost
Copy link

ghost commented Jan 4, 2022

Hi @preethamjebarajjohn. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

@ghost ghost removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Jan 4, 2022
@ghost
Copy link

ghost commented Jan 11, 2022

Hi @preethamjebarajjohn, since you haven’t asked that we “/unresolve” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve” to reopen the issue.

@ghost ghost closed this as completed Jan 11, 2022
@saragluna saragluna moved this to Todo in Spring Cloud Azure Apr 6, 2022
@saragluna saragluna moved this from Todo to Done in Spring Cloud Azure Apr 28, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
azure-spring All azure-spring related issues Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
Archived in project
Development

No branches or pull requests

4 participants