Jason
Jason

Reputation: 2617

ManualTrigger in Azure WebJob without outputting to queue at end

In my Visual Studio project I've created a WebJob that runs on a schedule (once a week) to dump logs from the db to blob storage. This works great but all the code is in a ManualTrigger method that has a queue message as a required output. I really have no need of this message so I'd rather not create it and have the queue sitting there growing with unused messages.

Am I understanding this correctly or is this queue message for something else and automatically removed? I can't seem to find any documentation on the generated ManualTrigger method.

My ManualTrigger code looks like:

[NoAutomaticTrigger]
public static void ManualTrigger(TextWriter log, int value, [Queue("queue")] out string message)
{
    ... Log Dump Code ...

    message = "Unused message";
}

Thanks, Jason

Upvotes: 1

Views: 581

Answers (1)

Victor Hurdugaci
Victor Hurdugaci

Reputation: 28425

If you don't need queue output, don't use it :) Just remove the last parameter and you should be good to go

Upvotes: 2

Related Questions