acumatica scheduled automated notifications, status "pending" even if messages were sent - notifications

Good day, friends!
I am trying to set up a schedule of sending notifications.
All is working except the part when status of each notification "pending" even if messages were sent, and as schedule works every 5 minutes users receive same emails every 5 minutes.
Any ideas?

Related

Grafana alerting with different time spans

I have a small problem. I have added an alert in Grafana that is supposed to send an email. however, this alert is only supposed to be sent when the problem has existed for at least 10 minutes. I have managed this so far, but now I would like the OK message to be sent immediately and not only after 10 minutes! Do you have any ideas on how to do this?

no result response from FCM push notification

We launched a new mobile app for iOS and Android devices first week of January and use FCM to send push notification to users.
Thus far we've sent (based on the firebase console report) ~60k notifications out to our users and overall its a very solid and reliable platform. We split our 'sends' in groups of 1000 push tokens / devices.
Question: ~15 times since we've launched we've received 'No Result' back from the CURL that sends the notifications upstream to FCM... and on one occasion we received an error 500.
To work around this and not just assume success we are detecting when the result isn't what we expect it to be upon success, and we log the response (i.e. "no result")... then wait 5 seconds and retry, up to 3 times. (our log message denotes the 'try number' as well).
We have, maybe twice a week, received the 'first try' message (meaning the first attempt failed and 5 secs later the 2nd attempt kicks off)... and only ONCE (this week) have we received the 'second try' message...
We're wondering if this is normal behavior for FCM? Is there some paid level of support or access that would alleviate these re-try instances for us? I don't think there is an SLA for FCM, but generally speaking are others seeing this same behavior and is the rate I've described here what you'd' consider 'normal'?
Thx!
Answer received from Google today:
Hello!
If I've correctly understood this, you have sent 60k messages and received 16 failures? That comes out to around 99.9997% success. Three nines is pretty much industry gold. So looking stellar so far.
There is no paid FCM version, but all clients, regardless of payment plan, run on the best hardware available so you're already in the premium servers. : )

In RabbitMQ is there a way to send messages to consumers at regular intervals?

We are using RabbitMQ to send notifications to users on apps. So there is a consumer that will send the notification to all the users using the app.
when we have multiple messages in the queue, we want rabbitmq to send each messages at least 1 hour apart.
So if there are 3 messages in the queue, each message will be sent an hour apart.
If there are no new messages in the queue and a new message is published, then depending on when the last message was sent to a consumer it will either hold it or send it.
Is there any direct way to do it?
Yes, there is, it's described here. I'll just quote a one part:
To delay a message a user must publish the message with the special
header called x-delay which takes an integer representing the number
of milliseconds the message should be delayed by RabbitMQ.
Also another approach (before rabbitmq added delays exchange) was using a combination of dead-letter exchange and message ttl as described here for example.
One way could be:
Schedule cron for every 5 or "x" minutes.
Cron checks if there is a message in the queue, it extracts ONE messge from the queue. If notification is sent successfully, you can change the schedule of the cron to next run after 60 minutes (and after 5 or x minutes post that run). Check this link for more information on rescheduling the window scheduled tasks.
Cron does nothing if there is no message in the queue.
I stumbled upon your question and wanted to have same thing with 10 second interval but was unable to do so while using channel.consume() methods.
I started reading the documentation and came to know that while using prefetch, queue will wait till the message is acked or nacked before sending another one.
So as a hack I gave timeout of 10 seconds to my ack/nack functionality and although my processing gets finished my consumer doesn't receive more messages since the last is still pending the acknowledgement.
Check the documentation here.
My sample code
if (response) {
setTimeout(() => {
console.log("acking now ");
pendingImportChannel.ack(pendingImportMessage);
}, 10000);
console.log("Pending import message acknowledged.");
} else {
console.log("Rejecting message => " + JSON.stringify(pendingImportDetails));
setTimeout(() => {
pendingImportChannel.nack(pendingImportMessage, false, true);
}, 10000);
}
Points to note
Your prefetch value should be 1 (or number of messages you want to receive in one call)
Make sure you don't ack/nack independently.
Keep your acknowledgementStrategy as noAck: false. (feel free to experiment here)
After a lot of digging I could not find a direct way to do it.
One way to achieve this is to write a cron job that runs every 60 mins (or what ever interval is required). The cron job will call a consumer that checks if there is a message in the queue. If there is, It will accept only one message, process it and then shut down.
The only disadvantage is that if the first message comes at t0+1 then even though there were no messages process before it will wait for 60 minutes before processing the message.
If this can be improved let me know.

windows phone push notifications 406 not acceptable

I'm getting 406 Not Acceptable as response when I try to send a push notification, I understand the problem and I've fixed the code that was causing it but I'm not quite sure how to make the error go away, the server responds with 406 to every one of my requests for push notifications. Will this happen by itself after a period of time or? Thanks.
This isn't an error you should (or could) do something about. It just means that you sent too many notifications to the same device or too many notifications per second, and you have to wait until you can send more.
406 Not Acceptable
This error occurs when an unauthenticated cloud service has reached the per-day throttling limit for a subscription, or when a cloud service (authenticated or unauthenticated) has sent too many notifications per second. The cloud service can try to re-send the push notification every hour after receiving this error. The cloud service may need to wait up to 24 hours before normal notification flow will resume.
(Source)
Fixed itself after a while, half a day or so.

SMS scheduling in symbian c++

how to send SMS after 4 days from a Symbian app by running the application in the bachground. Means application sends SMS after 4 days? Is that possible?
Please reply soon.
I don't think you would want to achieve this by running your application in the background for 4 days. For a start, if the phone was rebooted or ran out of battery in that time then the SMS wouldn't get sent when it was switched on again.
Instead, you can use the message centre API to schedule the SMS to be sent at a particular time.
The TMsvEntry class lets you call:
SetScheduled(ETrue);
SetSendingState(KMsvSendStateScheduled);
and then you can set TMsvEntry::iDate which is a TTime to the date/time you want the message to be sent.
This example shows how to send an SMS, try looking at:
void CSmsEngine::SendSmsL(const TDesC& aAddr, const TDesC& aMsg)
Comment out the SendSMSInThirdEditionL call, since you need to use the older API.
Make your changes in:
TMsvId CSMSExampleMtmsEngine::CreateSMSMessageL(const TDesC& aAddress,
const TDesC& aMessage)
Alternatively, if what you want to achieve is to send an SMS every 4 days, then you can use the Symbian Task Scheduler to do this. You can create an EXE which sends the SMS, then create a task which will run the EXE every 4 days. It will not keep anything running in the background so it won't waste battery, and it will remember to run the task even if you reboot the phone in between runs, since it persists the schedule to disk.
This example
shows how to create a task - so in the DoRunTaskL function you can send an SMS, for instance.
This example
shows how to schedule the task itself.
So to start your SMS sending schedule you would need to do something like that but edit the schedule to be every 4 days.
I would say that this is a relatively advanced programming challenge on Symbian. So if you are new I'd recommend doing some of the tutorials, reading the books etc. before starting it.