Loading ...
Sorry, an error occurred while loading the content.

Simple Retry Mechanism, how do I debug (based on AsyncPages sample)

Expand Messages
  • mystercodemonk
    Hi I have a website where a user signs up we need to add them to a legacy system via a soap webservice call. these webservice calls are queue d for retry
    Message 1 of 3 , Dec 5, 2010
    View Source
    • 0 Attachment
      Hi
      I have a website where a user signs up we need to add them to a legacy system via a soap webservice call. these webservice calls are queue'd for retry asynchronously...
      I have copied the AsyncPages sample.

      However the messages seem to flit in and out of the queue without being handled (nor are they put on the error queue). (the message shows in the journal queue)

      my website is configured like so:
          <UnicastBusConfig>
              <MessageEndpointMappings>
                  <add Messages="FooComMessages" Endpoint="FooComSignupService"/>
              </MessageEndpointMappings>
          </UnicastBusConfig>


      And I have this test code on a button click:
          Global.Bus.Send(new CreateMemberContractRequest[] {new CreateMemberContractRequest()
                                                                         {
                                                                            birthdate = DateTime.Parse("4 oct 1975")                                                             
                                                                         }});

      My message:
      namespace FooComMessages
      {
          [Serializable]
          public class CreateMemberContractRequest : IMessage
          {
              public DateTime birthdate { get; set; }
      //.... snip....//
          }
      }

      My Handler Config:
        <MsmqTransportConfig InputQueue="FooComSignupService" ErrorQueue="FooComSignupServiceErrors" NumberOfWorkerThreads="1" MaxRetries="20" />
        <UnicastBusConfig>
          <MessageEndpointMappings>
            <add Messages="FooComMessages" Endpoint="FooComSignupService" />
          </MessageEndpointMappings>
        </UnicastBusConfig>

      My Handler Code:
      namespace FooComSignupService
      {
          public class CreateMemberContractRequestHandler : IHandleMessages<CreateMemberContractRequest>
          {
              public IBus Bus { get; set; }
              private static readonly ILog Logger = LogManager.GetLogger(typeof(CreateMemberContractRequestHandler));
              public void Handle(CreateMemberContractRequest message)
              {
                  Logger.Info("------------------------------------\nHandling CreateMemberContractRequest. id="+message.webdatabaseid);
                  throw new NotImplementedException();
              }
          }
      }


      Does anyone have any idea what I could be doing wrong?
      I can't hit any breakpoints in the Handle method either.

      Cheers.
      Murray.
    • mystercodemonk
      P.S. the logging in NServiceBus.Host.exe shows this when I click the button: 2010-12-06 15:53:10,375 [Worker.5] DEBUG NServiceBus.Unicast.UnicastBus [(null)]
      Message 2 of 3 , Dec 5, 2010
      View Source
      • 0 Attachment
        P.S.
        the logging in NServiceBus.Host.exe shows this when I click the button:
        2010-12-06 15:53:10,375 [Worker.5] DEBUG NServiceBus.Unicast.UnicastBus [(null)] <(null)> - Calling 'HandleBeginMessage' on NServiceBus.SagaPersisters.NHibernate.NHibernateMessageModule
        2010-12-06 15:53:10,376 [Worker.5] INFO NServiceBus.Unicast.UnicastBus [(null)] <(null)> - Received message FooComMessages.CreateMemberContractRequest, FooComMessages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null with ID 0a072039-f37b-4bb2-8f85-2d13cd9dfff5\147 from sender
        2010-12-06 15:53:10,377 [Worker.5] DEBUG NServiceBus.Unicast.UnicastBus [(null)] <(null)> - Activating: GridInterceptingMessageHandler

        .... blah blah blah....

        that looks like it's activating the wrong handler.
      • mystercodemonk
        P.P.S also posted on SO here http://stackoverflow.com/questions/4370390/nservicebus-simple-retry-mechanism-how-do-i-debug-based-on-asyncpages-sample
        Message 3 of 3 , Dec 6, 2010
        View Source
        • 0 Attachment
        Your message has been successfully submitted and would be delivered to recipients shortly.