Comments (15)
+1 from me.
It's a non-trivial thing to do this unless you're using the built-in lock time of the message and simply not abandoning it (so it times out and is picked up again). This method has several drawbacks because you can only have 7 minutes lock time (sometimes you want to wait longer before retrying) and a message also has a max retry count (sometimes you want to retry within a time frame and don't care so much about the number of retries).
To be honest I don't really understand where Defer() would be safe to use if it's not combined with a permanent store like a database. If you defer a message and your VM/App is recycled you lose that message forever.
Defer(TimeSpan) or Defer(ScheduleteTimeUtc) sounds perfect. Or maybe a separate method like Reschedule(ScheduleTimeUtc).
from azure-service-bus-dotnet.
Great suggestion. Also would cut down amount of work that has to be done today on the client-side to get a workaround.
from azure-service-bus-dotnet.
Regarding Defer(), you are right. But this is an additional required improvement. Defer introduce more problems than it helps, in that case. My intension around Abandon() is to provide us features, which do not require so much programming and introducing additional artifacts like DB.
With Deffer(TimeSpan), I mean postponing of the message at scheduled time, without of need to keep reference of it.
from azure-service-bus-dotnet.
@binzywu it introduced overhead that needs to be taken into consideration and coded each time. Because it's no longer a single message based operation, you need to have a transaction. Rather than just using Defer(timespan)
.
Also, from a tracking point of view, you want to handle the same message, just later. Saying that, @djrosanova made a good point saying that ASB doesn't mutate messages. But in this case, it would not be exactly a mutation, if broker is instructed to defer the processing.
from azure-service-bus-dotnet.
@jtaubensee I think you wanted to link to issue #6? 😉
from azure-service-bus-dotnet.
This issue has been added to milestone backlog
. Given that we haven't planned for this feature yet, it might not be right to assign 2.0
milestone for this issue yet.
from azure-service-bus-dotnet.
I'll need this feature as it will be blocking for scenarios where a message needs to be delayed and the original message ID has to be kept, but native-dedup is in place. A workaround suggested here
Complete the message and schedule another message for 5 mins later.
would not work.
from azure-service-bus-dotnet.
What is the latest on this feature? This seems like a no-brainer feature for queue work.
Thanks.
from azure-service-bus-dotnet.
can this be achieved by re-send the current messages as scheduled messages and complete the current message?
from azure-service-bus-dotnet.
@ddobric - This is something that we can revisit when both .NET Core and AMQP support transactions. We could easily implement a method to do what you are talking about. We would create a transaction, complete the message, and send a scheduled message.
from azure-service-bus-dotnet.
Would this be considered for 1.0.0
or later?
from azure-service-bus-dotnet.
Like mentioned here , this would require AMQP transactions to be implemented first. Unfortunately, this would not make it to 1.0.0
.
from azure-service-bus-dotnet.
Thanks @nemakam. Skipped that comment. So it could be then added to the 2.0.0
milestone or 2.x
in case it has to be done after #6 is finished.
from azure-service-bus-dotnet.
Server side work is tracked here.
from azure-service-bus-dotnet.
We need this feature as well. I am trying to stay with a Microsoft stack, but it is difficult when the applications have to manage the scheduling and DLQ to get functionality that would be solved with a Defer(datetime) or Defer (timespan). Without it, the automatic DLQ functionality is not useful and we had to code logic to know when to dead letter a message.
from azure-service-bus-dotnet.
Related Issues (20)
- IReceiverClient : why does the RegisterMessageHandler not contain the client ? HOT 9
- MissingMemberException when receiving messages HOT 5
- Update AMQP library to the latest (2.4.1)
- Question - How to abandon a queue message with some updates to UserProperties? HOT 2
- Need SequenceNumber of enqueued service bus queue message HOT 4
- Efficient stream management
- ActiveClientLinkManager throws ArgumentOutOfRangeException in SetRenewCbsTokenTimer. HOT 1
- Please support SendAsync with cancellation token
- .Net Core version of receiving message session from a queue HOT 1
- Object reference not set to an instance of an object (while Send and Recv) on develop HOT 3
- Unhandeled exception? TaskCompletionSource`1[TResult].SetException HOT 3
- Make QueueClient startable / stoppable HOT 2
- QueueClient automatic lock renewals seem to fail silently leading to MessageLockLostException HOT 2
- Cannot access a disposed object. Object name: 'FaultTolerantAmqpObject`1'. HOT 3
- Session receiver stops processing next sessions HOT 2
- Lock renewal fails if the time on the receiving computer is set incorrectly HOT 3
- Restrict max concurrent messages across multiple receivers (of different queues) HOT 1
- AcceptMessageSession takes from 5 ms to more than few minutes without Timeout exception
- classes Message and SystemPropertiesCollection must provide abstractions to allow testing HOT 2
- Unhandeled exception? TaskCompletionSource`1[TResult].SetException
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-service-bus-dotnet.