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

[FEATURE REQ] More useful exception logging when user-exceptions occurs i processEvent callback in EventProcessorClient #42082

Open
1goldenboy opened this issue Sep 26, 2024 · 2 comments
Assignees
Labels
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. Event Hubs needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@1goldenboy
Copy link

Is your feature request related to a problem? Please describe.
Currently [artifactId=azure-messaging-eventhubs, groupId=com.azure, version=5.18.7] when an exception is thrown in com.azure.messaging.eventhubs.implementation.PartitionProcessor#processEvent, there will be logged 4 exceptions.
These are Error in event processing callback(x3) and Scheduler worker in group main failed with an uncaught exception.
Only the latter of these provide useful stacktrace for debugging, but the message itself isnt too helpful.

Describe the solution you'd like
I would like to have the amount of logged exceptions reduced to one and for that particular exception to provide a more useful error message.

To reduce the amount of exceptions logged I do believe that a solution is to only wrap and not log the caught exception in com.azure.messaging.eventhubs.PartitionPumpManager#processEvent. The same goes for com.azure.messaging.eventhubs.PartitionPumpManager#processEvents.

To provide a more useful error message I think the reactive chain in com.azure.messaging.eventhubs.PartitionPumpManager#startPartitionPump need to handle exceptions being thrown in the .subscribe callbacks. I believe the most straight forward way is to wrap the processEvents method in a try catch and handle the exception with the same logic as in the outer catch clause in com.azure.messaging.eventhubs.PartitionPumpManager#startPartitionPump.

Describe alternatives you've considered
Just ignore the duplicate errors

Information Checklist

  • [ x ] Description Added
  • [ x ] Expected solution specified
@github-actions github-actions bot added 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. Event Hubs needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Sep 26, 2024
Copy link

@anuchandy @conniey @lmolkova

Copy link

Thank you for your feedback. Tagging and routing to the team member best able to assist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. Event Hubs needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

2 participants