开发者

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

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 from the NServiceBus download.

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)

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="Fo开发者_如何学运维oComSignupServiceErrors" 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();
        }
    }
}

EDIT: I'm using NServiceBus.Host.exe to host the FooComSignupService

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

Cheers.

Murray.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜