Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF & MSMQ & TransactionScope long process
    text
    copied!<p>I am trying to develop a WCF service that take care of hundreds downloads and conversion together. I have been initialized MSMQ with a transaction queue that receive messages from an ASP.NET web application.</p> <p>My question after a long research on Internet is how to manage the long process in the WCF service method that manage the MSMQ message.</p> <p>The problem is that on download with small size, the process finish soon and the scope return complete to the MSMQ service, but if the download size is big and need 3/4 minutes to be downloaded, than the scope return still complete, but the MSMQ service resend the MSG to the WCF service and I have duplicated downloads.</p> <p>I guess this is a problem of timeout, but I have already tried to config better my Host app.config without success.</p> <pre><code> &lt;netMsmqBinding&gt; &lt;binding name="OrderServiceMsmqBinding" maxRetryCycles="1" receiveRetryCount="1" retryCycleDelay="00:05:20" deadLetterQueue="System" receiveErrorHandling="Move" exactlyOnce="true" durable="true" receiveTimeout="00:10:00" sendTimeout="00:20:00" timeToLive="1.00:00:00" useMsmqTracing="true"&gt; &lt;security mode="None"&gt;&lt;/security&gt; &lt;/binding&gt; &lt;/netMsmqBinding&gt; </code></pre> <p>and this is the method into WCF service:</p> <pre><code> &lt;OperationBehavior(TransactionScopeRequired:=True, TransactionAutoComplete:=True)&gt; _ Public Sub FfmpegConversion(ffmpegjob As FfmpegJob) Implements IOrderService.FfmpegConversion Using sc As New TransactionScope(TransactionScopeOption.Required) Try ExecuteLongProcess() Catch ex As Exception Console.WriteLine(ex.Message) Finally sc.Complete() End Try End Using End Sub </code></pre> <p><strong>UPDATE</strong></p> <p>After long trials and research, I'm starting to think that is impossible to make long process into the method that is fired by the MSMQ queeue.</p> <p>I workaround it using a different thread that manage the data, but now the problem is that I lose the TransactionScope vantage because once the job pass to the new thread, then the MSMQ delete the msg as believe that has been done.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload