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;








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:



  1. Get message and delete from queue

  2. Processing message

  3. If success - nothing happened, if failure (exception) - readd current.

Nothing more. Without any complex logic. Is it possible?










share|improve this question
























  • 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

















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:



  1. Get message and delete from queue

  2. Processing message

  3. If success - nothing happened, if failure (exception) - readd current.

Nothing more. Without any complex logic. Is it possible?










share|improve this question
























  • 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













0












0








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:



  1. Get message and delete from queue

  2. Processing message

  3. If success - nothing happened, if failure (exception) - readd current.

Nothing more. Without any complex logic. Is it possible?










share|improve this question














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:



  1. Get message and delete from queue

  2. Processing message

  3. 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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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

















  • 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












1 Answer
1






active

oldest

votes


















1














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.






share|improve this answer


























    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
    );



    );













    draft saved

    draft discarded


















    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









    1














    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.






    share|improve this answer































      1














      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.






      share|improve this answer





























        1












        1








        1







        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.






        share|improve this answer















        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.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        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





















            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.



















            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현