Azure Function and storage queueAzure Function and storage queue, what to do if function failsadd thousands of messages to an Azure Storage QueueAzure Storage Queue triggers a Function App, but it never qequesHidden messages in Azure storage queueC#-Azure function:How to log message to Queue storage when calling to “HTTP Trigger” azure function?What happens when an azure function throws an exception after it pulled a message off a queue?Azure function stops putting messages in storage queueAzure Storage Queues and Message ShapeAzure storage queue/functions, dequeue from poison queue only onceAzure Function not getting messages from Storage Queue
How do I use JSON.generator to generate an unnamed array?
Should I accept an invitation to give a talk from someone who might review my proposal?
Golden Guardian removed before death related trigger
What do I do with a party that is much stronger than their level?
How can I kill my goat?
How to efficiently shred a lot of cabbage?
Should I bike or drive to work? (6.8 mi)
What would the United Kingdom's "optimal" Brexit deal look like?
What is "sed -i 's,-m64,,g'" doing to this Makefile?
What is more environmentally friendly? An A320 or a car?
Finding out if upgrading to a newer macOS version will cause issues?
How can Paypal know my card is being used in another account?
Is there a way to know the composition of a Team GO Rocket before going into the fight?
What happens when a flying sword is killed?
Why isn't there any 9.5 digit multimeter or higher?
How can religions be structured in ways that allow inter-faith councils to work?
Is it okay for me to decline a project on ethical grounds?
(3 of 11: Akari) What is Pyramid Cult's Favorite Car?
Copying an existing HTML page and use it, is that against any copyright law?
Telling manager project isn't worth the effort?
Dobbs Murder Mystery : A Picture worth 1000 words?
How did the SysRq key get onto modern keyboards if it's rarely used?
Is there a wealth gap in Boston where the median net worth of white households is $247,500 while the median net worth for black families was $8?
Sci-fi change: Too much or Not enough
Azure Function and storage queue
Azure Function and storage queue, what to do if function failsadd thousands of messages to an Azure Storage QueueAzure Storage Queue triggers a Function App, but it never qequesHidden messages in Azure storage queueC#-Azure function:How to log message to Queue storage when calling to “HTTP Trigger” azure function?What happens when an azure function throws an exception after it pulled a message off a queue?Azure function stops putting messages in storage queueAzure Storage Queues and Message ShapeAzure storage queue/functions, dequeue from poison queue only onceAzure Function not getting messages from Storage Queue
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I try to use Azure Storage Queue with azure function and I imagined it as very simple - get message from queue, processing, add new if necessary. But right now I get a mess, messages readd during my function processing current message (I have long process), sometimes I see messages in queue, which processed long time ago.
Any way to say Azure Function:
- Get message and delete from queue
- Processing message
- If success - nothing happened, if failure (exception) - readd current.
Nothing more. Without any complex logic. Is it possible?
azure queue azure-storage azure-functions message-queue
add a comment |
I try to use Azure Storage Queue with azure function and I imagined it as very simple - get message from queue, processing, add new if necessary. But right now I get a mess, messages readd during my function processing current message (I have long process), sometimes I see messages in queue, which processed long time ago.
Any way to say Azure Function:
- Get message and delete from queue
- Processing message
- If success - nothing happened, if failure (exception) - readd current.
Nothing more. Without any complex logic. Is it possible?
azure queue azure-storage azure-functions message-queue
How long does your "long process" run? By default, functions time out after 5 minutes.
– John Hoerr
Mar 26 at 20:53
@JohnHoerr can be more than 5 minutes. Can I extend this value?
– Oleg Sh
Mar 26 at 21:05
Yes you can do all this and this is very much functions does. Default is 5mins and you can extend it upto 10 mins.
– Imran Arshad
Mar 26 at 21:51
@ImranArshad how to do it?
– Oleg Sh
Mar 26 at 21:59
add a comment |
I try to use Azure Storage Queue with azure function and I imagined it as very simple - get message from queue, processing, add new if necessary. But right now I get a mess, messages readd during my function processing current message (I have long process), sometimes I see messages in queue, which processed long time ago.
Any way to say Azure Function:
- Get message and delete from queue
- Processing message
- If success - nothing happened, if failure (exception) - readd current.
Nothing more. Without any complex logic. Is it possible?
azure queue azure-storage azure-functions message-queue
I try to use Azure Storage Queue with azure function and I imagined it as very simple - get message from queue, processing, add new if necessary. But right now I get a mess, messages readd during my function processing current message (I have long process), sometimes I see messages in queue, which processed long time ago.
Any way to say Azure Function:
- Get message and delete from queue
- Processing message
- If success - nothing happened, if failure (exception) - readd current.
Nothing more. Without any complex logic. Is it possible?
azure queue azure-storage azure-functions message-queue
azure queue azure-storage azure-functions message-queue
asked Mar 26 at 19:45
Oleg ShOleg Sh
3,2278 gold badges42 silver badges82 bronze badges
3,2278 gold badges42 silver badges82 bronze badges
How long does your "long process" run? By default, functions time out after 5 minutes.
– John Hoerr
Mar 26 at 20:53
@JohnHoerr can be more than 5 minutes. Can I extend this value?
– Oleg Sh
Mar 26 at 21:05
Yes you can do all this and this is very much functions does. Default is 5mins and you can extend it upto 10 mins.
– Imran Arshad
Mar 26 at 21:51
@ImranArshad how to do it?
– Oleg Sh
Mar 26 at 21:59
add a comment |
How long does your "long process" run? By default, functions time out after 5 minutes.
– John Hoerr
Mar 26 at 20:53
@JohnHoerr can be more than 5 minutes. Can I extend this value?
– Oleg Sh
Mar 26 at 21:05
Yes you can do all this and this is very much functions does. Default is 5mins and you can extend it upto 10 mins.
– Imran Arshad
Mar 26 at 21:51
@ImranArshad how to do it?
– Oleg Sh
Mar 26 at 21:59
How long does your "long process" run? By default, functions time out after 5 minutes.
– John Hoerr
Mar 26 at 20:53
How long does your "long process" run? By default, functions time out after 5 minutes.
– John Hoerr
Mar 26 at 20:53
@JohnHoerr can be more than 5 minutes. Can I extend this value?
– Oleg Sh
Mar 26 at 21:05
@JohnHoerr can be more than 5 minutes. Can I extend this value?
– Oleg Sh
Mar 26 at 21:05
Yes you can do all this and this is very much functions does. Default is 5mins and you can extend it upto 10 mins.
– Imran Arshad
Mar 26 at 21:51
Yes you can do all this and this is very much functions does. Default is 5mins and you can extend it upto 10 mins.
– Imran Arshad
Mar 26 at 21:51
@ImranArshad how to do it?
– Oleg Sh
Mar 26 at 21:59
@ImranArshad how to do it?
– Oleg Sh
Mar 26 at 21:59
add a comment |
1 Answer
1
active
oldest
votes
Based on comments above
Your function is triggered by message in service bus. You process the message. If you are happy and done in the given execution time (5 mins default) then message is marked as completed. If you are not happy , throw the exception. The function will consider message not completed and abandon it so it re-appears in the queue , however you retry count will keep on growing until it reaches the max value after which message is sent to dead letter queue.
Couple of points to note
If you don't throw the exception and process does it itself (due to some processing error) it still considers it abandoned message and will retry . However if function executes successfully without throwing any error but result is not what you want then throw ex your self.
Also in services bus increase the lock time to match the processing time of your function. e.g. function takes 5 mins to complete , but your message lock time in your services bus is 30 secs , the message will reappear in message queue while the other copy of message is still being processed by function. So increase your services bus message lock time that you consider is sufficient for function to complete the process.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55365165%2fazure-function-and-storage-queue%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Based on comments above
Your function is triggered by message in service bus. You process the message. If you are happy and done in the given execution time (5 mins default) then message is marked as completed. If you are not happy , throw the exception. The function will consider message not completed and abandon it so it re-appears in the queue , however you retry count will keep on growing until it reaches the max value after which message is sent to dead letter queue.
Couple of points to note
If you don't throw the exception and process does it itself (due to some processing error) it still considers it abandoned message and will retry . However if function executes successfully without throwing any error but result is not what you want then throw ex your self.
Also in services bus increase the lock time to match the processing time of your function. e.g. function takes 5 mins to complete , but your message lock time in your services bus is 30 secs , the message will reappear in message queue while the other copy of message is still being processed by function. So increase your services bus message lock time that you consider is sufficient for function to complete the process.
add a comment |
Based on comments above
Your function is triggered by message in service bus. You process the message. If you are happy and done in the given execution time (5 mins default) then message is marked as completed. If you are not happy , throw the exception. The function will consider message not completed and abandon it so it re-appears in the queue , however you retry count will keep on growing until it reaches the max value after which message is sent to dead letter queue.
Couple of points to note
If you don't throw the exception and process does it itself (due to some processing error) it still considers it abandoned message and will retry . However if function executes successfully without throwing any error but result is not what you want then throw ex your self.
Also in services bus increase the lock time to match the processing time of your function. e.g. function takes 5 mins to complete , but your message lock time in your services bus is 30 secs , the message will reappear in message queue while the other copy of message is still being processed by function. So increase your services bus message lock time that you consider is sufficient for function to complete the process.
add a comment |
Based on comments above
Your function is triggered by message in service bus. You process the message. If you are happy and done in the given execution time (5 mins default) then message is marked as completed. If you are not happy , throw the exception. The function will consider message not completed and abandon it so it re-appears in the queue , however you retry count will keep on growing until it reaches the max value after which message is sent to dead letter queue.
Couple of points to note
If you don't throw the exception and process does it itself (due to some processing error) it still considers it abandoned message and will retry . However if function executes successfully without throwing any error but result is not what you want then throw ex your self.
Also in services bus increase the lock time to match the processing time of your function. e.g. function takes 5 mins to complete , but your message lock time in your services bus is 30 secs , the message will reappear in message queue while the other copy of message is still being processed by function. So increase your services bus message lock time that you consider is sufficient for function to complete the process.
Based on comments above
Your function is triggered by message in service bus. You process the message. If you are happy and done in the given execution time (5 mins default) then message is marked as completed. If you are not happy , throw the exception. The function will consider message not completed and abandon it so it re-appears in the queue , however you retry count will keep on growing until it reaches the max value after which message is sent to dead letter queue.
Couple of points to note
If you don't throw the exception and process does it itself (due to some processing error) it still considers it abandoned message and will retry . However if function executes successfully without throwing any error but result is not what you want then throw ex your self.
Also in services bus increase the lock time to match the processing time of your function. e.g. function takes 5 mins to complete , but your message lock time in your services bus is 30 secs , the message will reappear in message queue while the other copy of message is still being processed by function. So increase your services bus message lock time that you consider is sufficient for function to complete the process.
edited Mar 26 at 22:20
answered Mar 26 at 22:14
Imran ArshadImran Arshad
1,5292 gold badges10 silver badges15 bronze badges
1,5292 gold badges10 silver badges15 bronze badges
add a comment |
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55365165%2fazure-function-and-storage-queue%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
How long does your "long process" run? By default, functions time out after 5 minutes.
– John Hoerr
Mar 26 at 20:53
@JohnHoerr can be more than 5 minutes. Can I extend this value?
– Oleg Sh
Mar 26 at 21:05
Yes you can do all this and this is very much functions does. Default is 5mins and you can extend it upto 10 mins.
– Imran Arshad
Mar 26 at 21:51
@ImranArshad how to do it?
– Oleg Sh
Mar 26 at 21:59