azure - Exception Handling for Service Bus Queue Host Service -
i have wcf service connected service bus queue ready receive messages. working great able mark message deadletter if have issue processing message. if code throws exception message still gets removed queue, want able in configuration specify not deleted queue mark deadletter. i've done search , can't figure out on how that. running service windows service
uri baseaddress = servicebusenvironment.createserviceuri("sb", "namespace", "servicequeue"); _servicehost = new servicehost(typeof(paperlessimportserviceoneway), baseaddress); _servicehost.open();
config:
<services> <service name="enrollment.serviceoneway"> <endpoint name="serviceoneway" address="sb://namespace.servicebus.windows.net/servicequeue" binding="netmessagingbinding" bindingconfiguration="messagingbinding" contract="iserviceonewaysoap" behaviorconfiguration="sbtokenprovider" /> </service> </services> <netmessagingbinding> <binding name="messagingbinding" closetimeout="00:03:00" opentimeout="00:03:00" receivetimeout="00:03:00" sendtimeout="00:03:00" sessionidletimeout="00:01:00" prefetchcount="-1"> <transportsettings batchflushinterval="00:00:01" /> </binding> </netmessagingbinding> <behavior name="sbtokenprovider"> <transportclientendpointbehavior> <tokenprovider> <sharedsecret issuername="owner" issuersecret="xxxxxxxxxxxxxxxxxxxxxxxx" /> </tokenprovider> </transportclientendpointbehavior> </behavior>
in interface opertion contract add together [receivecontextenabled(manualcontrol = true)] can manage commit or abandon message found in link: http://msdn.microsoft.com/en-us/library/windowsazure/hh532034.aspx
azure azureservicebus
No comments:
Post a Comment