{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/691","repository_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk","labels_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/691/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/691/comments","events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/691/events","html_url":"https://github.com/Azure/azure-webjobs-sdk/issues/691","id":145759352,"number":691,"title":"AutoAbandon ?","user":{"login":"funkycoding","id":307410,"avatar_url":"https://avatars.githubusercontent.com/u/307410?v=3","gravatar_id":"","url":"https://api.github.com/users/funkycoding","html_url":"https://github.com/funkycoding","followers_url":"https://api.github.com/users/funkycoding/followers","following_url":"https://api.github.com/users/funkycoding/following{/other_user}","gists_url":"https://api.github.com/users/funkycoding/gists{/gist_id}","starred_url":"https://api.github.com/users/funkycoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/funkycoding/subscriptions","organizations_url":"https://api.github.com/users/funkycoding/orgs","repos_url":"https://api.github.com/users/funkycoding/repos","events_url":"https://api.github.com/users/funkycoding/events{/privacy}","received_events_url":"https://api.github.com/users/funkycoding/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-04T18:03:27Z","updated_at":"2016-04-05T06:09:49Z","closed_at":null,"body":"Is it possible to add an option to OnMessageOptions to ignore the AbandonAsync call? aka: AutoAbandon or something?\r\n\r\nI'm using the ServiceBusTrigger and if a message fails i just want the lock to run out and try again. Currently it's just triggering the function 5 times (delivery count on queue in azure) quickly in a row.\r\n\r\nI'm happy to inherit and override, but had to share my 2ct :moneybag: :smile: \r\n\r\n```csharp\r\npublic override async Task CompleteProcessingMessageAsync(BrokeredMessage message, FunctionResult result, CancellationToken cancellationToken)\r\n{\r\n    if (result.Succeeded)\r\n    {\r\n        if (!MessageOptions.AutoComplete)\r\n        {\r\n            // AutoComplete is true by default, but if set to false\r\n            // we need to complete the message\r\n            cancellationToken.ThrowIfCancellationRequested();\r\n            await message.CompleteAsync();\r\n        }\r\n    }\r\n    else\r\n    {\r\n        cancellationToken.ThrowIfCancellationRequested();\r\n        await message.AbandonAsync();\r\n    };\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/comments/205667554","html_url":"https://github.com/Azure/azure-webjobs-sdk/issues/691#issuecomment-205667554","issue_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/691","id":205667554,"user":{"login":"funkycoding","id":307410,"avatar_url":"https://avatars.githubusercontent.com/u/307410?v=3","gravatar_id":"","url":"https://api.github.com/users/funkycoding","html_url":"https://github.com/funkycoding","followers_url":"https://api.github.com/users/funkycoding/followers","following_url":"https://api.github.com/users/funkycoding/following{/other_user}","gists_url":"https://api.github.com/users/funkycoding/gists{/gist_id}","starred_url":"https://api.github.com/users/funkycoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/funkycoding/subscriptions","organizations_url":"https://api.github.com/users/funkycoding/orgs","repos_url":"https://api.github.com/users/funkycoding/repos","events_url":"https://api.github.com/users/funkycoding/events{/privacy}","received_events_url":"https://api.github.com/users/funkycoding/received_events","type":"User","site_admin":false},"created_at":"2016-04-05T06:09:49Z","updated_at":"2016-04-05T06:09:49Z","body":"> We can't add a property to OnMessageOptions since we don't own that Type (it's from the ServiceBus SDK). \r\n\r\nKinda missed that part...probably due to a long work day :smile: \r\n\r\nI understand you rather have a consistent solution. For Azure Service Bus messages we can't set the visibility timeout (afaik). I'll just customize the MessagingProvider & MessageProcessor to fit my needs for now. Thanks for the reply!\r\n"}}