EventHub Golang client error: amqp:internal-error - azure

I try to use EventHub Go client to send a simple "hello world" event but got this error message:
*Error{Condition: amqp:internal-error, Description: The service was unable to process the request; please retry the operation. For more information on exception types and proper exception handling, please refer to http://go.microsoft.com/fwlink/?LinkId=761101 TrackingId:be0c66437a1447b7accdc113c84955dd_G5, SystemTracker:gateway5, Timestamp:2021-07-10T21:28:48, Info: map[]}
The code is exactly the same as this sample code here: https://github.com/Azure/azure-event-hubs-go
The SO thread I found which somehow has similar error message is here Getting "amqp:internal-error" when peeking messages from Azure Service Bus Queue using AMQP, rhea and Node, but it is for Service Bus and Node client.
Any idea why this issue occured?

This error is pretty non-descriptive.
One way to trigger is to specify an EventHubs connection string without an EntityPath=<event hub name> in it.
So if you're using a broker level connection string you'll need to specify the EventHub you're attempting to connect to by adding EntityPath=eventHubName. The readme snippet does list this, but the error is admittedly not great in that situation.
I've filed this issue to at least improve the error message in that case, as it doesn't really lead you to what's wrong.
https://github.com/Azure/azure-event-hubs-go/issues/222

Related

What is the "SystemTracker" in the Azure Service Bus Exception?

I am getting the below exception and would like to know what is the "SystemTracker" that is mentioned in the exception. Also, the namespace in the message entity and in the System Tracker are different. Why could those be different? One has "stage1c" and the other is "1a". If 1c is a failover for "1a", then could it log exception like this?
Azure.Messaging.ServiceBus.ServiceBusException: Put token failed. status-code: 404, status-description: The messaging entity 'sb://c0000hwabt-stage1c.servicebus.windows.net/becm.job.summary.response' could not be found. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:3123b33a-315a-40d5-a1e7-243b2611335e_G9, SystemTracker:c0000hwabt-stage1a.servicebus.windows.net:becm.job.summary.response, Timestamp:2022-10-20T15:56:04. (MessagingEntityNotFound)
These are set by the Service Bus service for use with correlating logs and troubleshooting from the service-side. They're helpful information to include when opening a support ticket but are otherwise not useful. Your application should treat them as opaque values and not assume any meaning to the client.

How do we check a message that caused a SessionLockLostException error in the service bus?

I am getting a few sessionlostlock exceptions while sending some messages to our SB triggered function app. We've set up alerts to check whenever such an error occurs. Although these messages do get retried and there no messages are sent to the DLQ. How do I find out which messages gave these exceptions in the first place.
How do I find out which messages gave these exceptions in the first place?
According to documentation:
You can use MessagingException.Detail Property to get the detail information on the messaging exception.
public Microsoft.ServiceBus.Messaging.MessagingExceptionDetail Detail { get; }
References: Cause and resolution of SessionLockLostException, Class SessionLockLostException and SessionLockLostException(String, Exception)

Azure Service Bus - random deserialization issues

I've been recently having problems with my Service Bus queue. Random messages (one can pass and the other not) are placed on the deadletter queue with the error message saying:
"DeadLetterReason": "Moved because of Unable to get Message content There was an error deserializing the object of type System.String. The input source is not correctly formatted."
"DeadLetterErrorDescription": "Des"
This happens even before my consumer has the chance to receive the message from the queue.
The weird part is that when I requeue the message through Service Bus Explorer it passes and is successfully received and handled by my consumer.
I am using the same version of Service Bus either for sending and receiving the messages:
Azure.Messaging.ServiceBus, version: 7.2.1
My message is being sent like this:
await using var client = new ServiceBusClient(connString);
var sender = client.CreateSender(endpointName);
var message = new ServiceBusMessage(serializedMessage);
await sender.SendMessageAsync(message).ConfigureAwait(true);
So the solution I have for now for the described issue is that I implemented a retry policy for the messages that land on the dead-letter queue. The message is cloned from the DLQ and added again to the ServiceBus queue and for the second time there is no problems and the message completes successfully. I suppose that this happens because of some weird performance issues I might have in the Azure infrastructure. But this approach bought me some time to investigate further.

Camel AMQP autoAck failed to resolve an endpoint

I am trying to set autoAck to false while reading from azure service bus queue, which I am connecting using amqp. Below is the code.
from("amqp:queue:testqueue?autoAck=false&concurrentConsumers=1")
But I am getting an error msg:
Failed to create route route1: Route(route1)[[From[amqp:queue:testqueue?autoAck=false&concu... because of Failed to resolve endpoint: amqp://queue:testqueue?autoAck=false&concurrentConsumers=1 due to: Failed to resolve endpoint: amqp://queue:testqueue?autoAck=false&concurrentConsumers=1 due to: There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{autoAck=false}]
I am trying to process the messages from the service bus queue but don't want them to be removed till the time processing is not complete.
I finally found the answer, in order to remove the messages from the queue only when a consumer has accepted the message and acknowledged that it was successfully processed, you need to add "acknowledgementModeName" to the route
from("amqp:queue:testqueue?acknowledgementModeName=CLIENT_ACKNOWLEDGE&concurrentConsumers=1")
For more clarification visit this page http://camel.apache.org/jms.html

Error in metadata reply for topic test (PartCnt 0): Broker: Unknown topic or partition' } using node-rdkafka

Hi am getting this error when am trying to connect to kafka remotely on my prod server.My messages are not getting produced and/or consumed from my code.Let me know if any code sample is needed.Just want to know what can be the reasons for receiving this error.
Just in case some one else go through the same issue: the issue for me was i was using it with kerberos the principal name and the keytab file that I was using didn't have permissions to create topic or produce/consume message!

Resources