Kapila Thilakarathne, Apologies for the delayed response.
Based on my understanding you are intermittently (and rarely) receives this error ProtocolNegotiationException
when calling NotificationHubClient.sendNotification
( Notification-Hubs-java-sdk 1.1.0.) - Were there any changes made prior to this issue? does the issue reoccur at any specific interval or time?
The Azure Notification Hubs SDK for Java has a retry policy called the BasicRetryPolicy
, which retries based on status codes from Azure Notification Hubs. You might double check if the retry policy is correctly configured and if it needs adjustments
Intermittent errors can often be attributed to network instability. Please check your network for any issues that might be causing interruptions or packet loss - use network monitoring tools to identify any irregularities during the times when the errors occur.
If you haven't done, (when the issue reoccurs) you may leverage Notification Hub diagnostics > from Azure Portal> Navigate to your Notification Hub app in the Azure Portal.
In the left navigation, click on Diagnose and solve problems
- Review - “ diagnostics options' to fetch additional info: ( screenshot below)