Comments (7)
Actually what I reported happens to a Spring Boot Starter Web application running in AKS as well. The app (in JVM) keeps running but the error handler doesn't get called.
I think you misunderstood the whole point. I expect both the error handler to get called and the retry to happen.
After adding a Thread.sleep
, yes it does keep running and printing some logs, and when I recreate the subscription manually, it stops printing logs which is part of what I expect.
However, my error handler function doesn't get called, unlike in the previous versions.
In my use case, I am relying on the error handler to recreate the subscription when the subscription gets deleted, in version 5.8.0
and below, it will give me an error context with ServiceBusFailureReason.MESSAGING_ENTITY_NOT_FOUND
. In 5.9.1
and above, my error handler function doesn't get called.
I don't see this change mentioned in the changelog. Do you mind telling me if it is mentioned anywhere in docs, and how my program can know if the subscription is missing or deleted?
Thanks.
from azure-sdk-for-java.
I see. Okay, my first focus was on reported observation where program exit without retry, so wanted to debug if the Processor was stopping it's "reconnect attempts" (here after entity deletion). Since Spring has a non-demon + always running parent thread, Processor’s internal reconnect attempts should not stop.
Thank you for the additional context around the application specific dependency on error inspection, it clarifies the end-to-end use case. I'll compare Processor's behavior in 5.8.0 versus 5.9.1 and get back.
from azure-sdk-for-java.
Hello @blackr1234, I looked into this, and the dropping of error notification is now addressed in #39723. Thank you for reporting this.
from azure-sdk-for-java.
from azure-sdk-for-java.
Thank you for your feedback. Tagging and routing to the team member best able to assist.
from azure-sdk-for-java.
Updated post with dependency information and detailed descriptions of the expected and actual behaviors.
from azure-sdk-for-java.
Hello @blackr1234,
I was testing this, and as you observed the error is not propagated but unlike your case, the ServiceBusProcessorClient kept retried and connected to the entity as soon as I re-created the entity, then it resumed pumping messages.
I think your application setup is running into this #30170
So the point here is – the start() call will start the asynchronous message pumping using demon-threads. If the main/application (non-demon) thread exits for any reason, then the demon-threads pumping the messages will be killed by the JVM.
This is likely the case you’re running into. The easiest way to check this is by using a simple Java console application,
- with the code you shared.
- Put a sleep(10min) after the client.start()
- Now delete the entity (queue, subscription), in the logs you will see retry happening.
- Recreate the entity from portal (before the sleep(10min) expires), you should see the processor connecting to the entity.
from azure-sdk-for-java.
Related Issues (20)
- [OpenAI] Record tests by using latest azure-core-test HOT 1
- [FEATURE REQ] Support overriding the endpoint for NonAzureOpenAIClientService HOT 5
- [QUERY] ContainerGroup state() function always returns NULL HOT 16
- [QUERY] How to fetch the private key from Azure Keyvault Secret and convert it to a "java.security.PrivateKey" Java object? HOT 2
- [Key Vault] Re-generate libraries and release first beta for service version `7.6-preview.1`
- [BUG]DiagnosticsReplicaStatusList improvement
- Port WorkloadIdentityCredential to use ClientAssertionCredential.
- Revisit shared singleton `HttpClient` mechanism
- More HTTP client support (with SSE support)
- Ensure private methods don't throw `UnhandledIOException` and instead throw `IOException`
- [OpenAI-Assistants] Support Assistant v2 API version HOT 1
- Revisit default constants in `RequestOptions`, `Context`, `BinaryData` and similar classes HOT 1
- Refactor `ServerSentEventUtils`
- [OpenAI] Add support for Batch API
- [BUG] azure-storage rename takes over 2 minutes to fail (because the target file already exists) in concurrent context HOT 2
- [BUG]DiagnosticsImprovement: Adding CurrentReplicaSetSize and quorumAckedLSN
- [QUERY] Is there a way to set config for CosmosClientBuilder HOT 3
- [BUG] Azure Toolkit for IntelliJ - IntelliJCredential does not find logged in creds in keychain on Mac HOT 5
- [BUG] pom_file_version_scanner.ps1 needs better errors around misformed lines
- [BUG] container registry lisrepository names only returns 109 max HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-sdk-for-java.