WCF and transactional MSMQ - multiple dispatches? RRS feed

  • Question

  • using Transactional MSMQ and WCF here in C#

    sometimes for some reason, the message gets redispatched from the MSMQ even though the previous time, the message was processed successfully (i.e no unhandled exceptions or anything). There is only just the 1 msg I am placing on the queue.

    any ideas why?

    Sure, I am also debugging when the msg gets dispatched but I only have a very small number of breakpoints in certain areas and spend no longer than 3 seconds looking at the things I need to look at in that context of the msg being flowed into the system.

    any ideas why duplicate dispatches?

    public interface IMessageHandlerService
            [OperationContract(IsOneWay = true, Action = "*")]
            void ProcessMessage(MsmqMessage<CustomMessage> message);
    [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Single, InstanceContextMode = InstanceContextMode.Single, ReleaseServiceInstanceOnTransactionComplete = false)]
        public sealed class MessageHandlerService : IMessageHandlerService
            [OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = true)]
            public void ProcessMessage(MsmqMessage<CustomMessage> message)

    my ABC:
            <behavior name="IncludeExceptionDetails">
              <callbackDebug includeExceptionDetailInFaults="true" />         
          <service name="Services.Implementation.MessageHandler.MessageHandlerService">
            <endpoint address="msmq.formatname:DIRECT=OS:.\private$\msgs" binding="msmqIntegrationBinding" bindingConfiguration="MessageHandlerBinding" contract="Services.Contracts.Messages.IMessageHandlerService">
            <binding name="MessageHandlerBinding"
              <security mode="None"/>

    as you can see, I do have ExactlyOnce = true.

    This problem only happens sometimes, not all the time. im stumped!

    C# MVP (2007-2010) MS Vendor - MS All the way! Follower since 1995 MS Super Evangelist| MSDN Forums Moderator

    Thursday, November 1, 2012 1:36 PM

All replies