Open moarychan opened 1 year ago
A workaround is to move the retry options to spring.cloud.azure.eventhubs
, such as below configuration:
spring:
cloud:
azure:
eventhubs:
retry:
mode: exponential
try-timeout: PT2S
exponential:
base-delay: PT1S
max-delay: PT3S
max-retries: 3
Service Bus also has this problem.
Hi :)
Any input on this?
I tried to configure a retry policy for my application, and the following configuration doesn't get applied:
spring:
cloud:
azure:
retry:
exponential:
max-retries: 3
base-delay: PT1S
max-delay: PT10S
mode: exponential
servicebus:
namespace: ${AZURE_SERVICEBUS_NAMESPACE}
retry:
exponential:
max-retries: 3
base-delay: PT1S
max-delay: PT10S
mode: exponential
stream:
bindings:
consumeDocumentChange-in-0:
destination: documents
function:
definition: consumeDocumentChange;
The message is simply retried 10 times in a row.
Thank you!
pom.xml
:
<spring-cloud.version>2023.0.3</spring-cloud.version>
<spring-cloud-azure-dependencies>5.14.0</spring-cloud-azure-dependencies>
...
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>spring-cloud-azure-dependencies</artifactId>
<version>${spring-cloud-azure-dependencies}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
...
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>spring-cloud-azure-stream-binder-servicebus</artifactId>
</dependency>
...
Describe the bug The retry functionality does not work, since the below configuration will not be applied correctly when using Spring Cloud Azure Stream Binder Event Hub.
Exception or Stack Trace N/A
To Reproduce
Code Snippet N/A
Expected behavior The retry options should only be taken for the consumer client, maybe all Azure SDK client, and the documentation should be synced as well.
Screenshots N/A
Setup (please complete the following information):
Additional context The same issues may exist for client options and proxy options, as well as the Service Bus side.
Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report