we want able hold property in service bus queue brokered message stores status of item; in cases item reprocessed whatever reason have record indicating in process had got (improving our retry logic).
so have below code picking item queue:
var brokeredmessage = _queueclient.receive(timespan.fromseconds(default_wait_time_in_seconds));
then want adjust property holds status enum so:
brokeredmessage.properties.add("status", messagestatusenum.messagereceived);
is possible persist new / update property within brokered message this, additional method have called, or changes made properties lost after has been received?
today not have ability update , existing brokeredmessage in queue. can add properties existing brokered message when performing abandon
or deadletter
operations on message itself. see http://msdn.microsoft.com/en-us/library/windowsazure/jj673129.aspx
we support scenarios want store progress of workflow/group of messages through messagesession
. here enable sessions
queue/subscription , rather processing messages call acceptmessagesession
. sessionid
property of message determine session belongs to. each session has state available can access thru getstate
, setstate
on messagesession
. transactions supported these operations allow strong consistency guarantees. following sample demonstrates use of sessions , session state: http://code.msdn.microsoft.com/brokered-messaging-session-41c43fb4
Comments
Post a Comment