views:

35

answers:

1

Can you set TTBR (Time To Be Received) on a message sent using NServiceBus?

+1  A: 

Absolutely - put the TimeToBeReceived attribute on the relevant message class. Here's an example setting it to 10 minutes:

[TimeToBeReceived("00:10:00")]

Udi Dahan
Thank you for the information! I've got one quick follow-up question: can client override that attribute programmatically? Mine is a scenario in which client sends notifications about its status to the server at a given interval. If the interval is set to 10 minutes then I want TimeToBeReceived be set to 10 minut because only the latest status is of importance. It would be good if the interval configuration was up to a client.
mgamer
Why would the server want it to be any other value then?
Udi Dahan
Well, it is up to the client how often it wants to notify server about its status. Maybe that's not the most important feature but definitely some way of setting different TimeToBeReceived value for test/production environment would be of value to me.
mgamer
Michael, TimeToBeReceived really is only relevant for production environments. Under regular conditions, messages will be delivered close to instantly - it's only under failure conditions that it starts to have an effect.
Udi Dahan