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
Related
I have a function app attached to a storage account with 3 functions with timer triggers that randomly stopped working since last month.
Any pointers to troubleshoot?
Log stream pasted below
2022-06-09T03:19:21Z [Information] Retrying to start listener for
function 'Functions.MonthlyTriggerTotal' (Attempt 18)
2022-06-09T03:19:21Z [Information] Retrying to start listener for
function 'Functions.TimerTrigger1' (Attempt 18) 2022-06-09T03:19:21Z
[Information] Retrying to start listener for function
'Functions.RecurringExpensesTrigger' (Attempt 18) 2022-06-09T03:19:21Z
[Verbose] Host instance 'xxxx-xxx-xxxxxxxxx' failed to acquire host
lock lease: Azure.Storage.Blobs: Server failed to authenticate the
request. Make sure the value of Authorization header is formed
correctly including the signature.
RequestId:d859920b-901e-0035-40af-7b9e9a000000
Time:2022-06-09T03:19:21.2193397Z Status: 403 (Server failed to
authenticate the request. Make sure the value of Authorization header
is formed correctly including the signature.) ErrorCode:
AuthenticationFailed
Additional Information: AuthenticationErrorDetail: The MAC signature
found in the HTTP request 'xxx-xxxx-xxx-xxxx' is not the same as any
computed signature. Server used following string to sign: 'PUT
Retrying to start listener for function 'Functions.TimerTrigger1
AFAIK this issue not a problem in function app or platform which you have deployed as it is not synchronized properly.
Make sure your triggers are synchronized properly, try to disable, and enable in app setting and click refresh next to your app name.
Please check your time zone which you have configured in timer trigger function. If you must modify the same in it, use WEBSITE_TIME_ZONE setting. Also, check your desktop time too.
Please check this related answer provided by MayankBargali-MSFT
Timer triggered function app uses TimerTriggerAttribute. This attribute consists of Singleton Lock feature which can run a single instance of function at given time. If you are using the same storage account with different timer trigger functions, try to disable them by using_ UseMonitor = false on your TimerTrigger attribute.
Try to check the connection of local.settings.json for every function running locally.
Make sure you should not enable runOnStartup to true
Check whether the other two function apps uses time trigger to the same identifying configuration, only one timer can run.
If you are using azure function in cosmos db triggered, refer this
So
thread by Doris Lv
Please check this issue via running on Azure Functions diagnostics, if the issue still persists please raise azure support ticket to guides you right information
For your Reference :
https://github.com/Azure/azure-webjobs-sdk-extensions/wiki/TimerTrigger#troubleshooting
https://github.com/Azure/azure-functions-host/wiki/Investigating-and-reporting-issues-with-timer-triggered-functions-not-firing
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.
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
I have a website and and a webjob, where the website is a oneway client and the webjob is worker.
I use the Azure ServiceBus transport for the queue.
I get the following error:
InvalidOperationException: Cannot use ourselves as timeout manager
because we're a one-way client
when I try to send Bus.Defer from the website bus.
Since Azure Servicebus have built in support for timeoutmanager should not this work event from a oneway client?
The documentation on Bus.Defer says: Defers the delivery of the message by attaching a header to it and delivering it to the configured timeout manager endpoint
/// (defaults to be ourselves). When the time is right, the deferred message is returned to the address indicated by the header."
Could I fix this by setting the ReturnAddress like this:
headers.Add(Rebus.Messages.Headers.ReturnAddress, "webjob-worker");
Could I fix this by setting the ReturnAddress like this: headers.Add(Rebus.Messages.Headers.ReturnAddress, "webjob-worker");
Yes :)
The problem is this: When you await bus.Defer a message with Rebus, it defaults to return the message to the input queue of the sender.
When you're a one-way client, you don't have an input queue, and thus there is no way for you to receive the message after the timeout has elapsed.
Setting the return address fixes this, although I admit the solution does not exactly reek of elegance. A nicer API would be if Rebus had a Defer method on its routing API, which could be called like this:
var routingApi = bus.Advanced.Routing;
await routingApi.Defer(recipient, TimeSpan.FromSeconds(10), message);
but unfortunately it does not have that method at the moment.
To sum it up: Yes, setting the return address explicitly on the deferred message makes a one-way client capable of deferring messages.
I have created a web service to update our passbooks with the following entries in my routes file:
// Registering a Device to Receive Push Notifications for a Pass
app.post('/Passbook/v1/devices/:dli/registrations/:typeid/:serial', PBAdmin.registerDevice);
// Getting the Serial Numbers for Passes Associated with a Device
app.get('/Passbook/v1/devices/:dli/registrations/:typeid',PBAdmin.getSerialNumbers);
// Getting the Latest Version of a Pass
app.get('/Passbook/v1/passes/:typeid/:serial', PBAdmin.getUpdatedPass);
// Unregistering a Device
app.delete('/Passbook/v1/devices/:dli/registrations/:typeid/:serial', PBAdmin.unregisterDevice);
// Logging Errors
app.post('/Passbook/v1/log', PBAdmin.logErrors);
The problem is that after a passbook is downloaded by a user my web service end point receives a GET request instead of POST request for registering a device (from my log file)
GET /Passbook/v1/devices/xxxxxxxxxxxxxxe99ddc69a5a9/registrations/xxx.xxxx.xxxx.app.dev.passbook/1408646948910 401 18ms - 12b
In fact this happens for the log handler as well (which is supposed to be POST with error message). I am not sure why that is and how to fix it.