I am experiencing this problem, so I am completely harming. I am new to NServiceBus and so far has a dead simple 'server' installed which listens for messages sent by a web application. The server asks for custom initialization (IWantCustomInitialization) and uses one. This custom builder is basically a copy of the one that comes with the NServiceBus source code, with two minor changes to move away from deprecated methods in Windsor 2.5.
Note uses my code, container example with NServiceBus.
The problem I have is that every message sent by the web application is processed by the server five (5) times. The log file contains five entries for every attempt, in this way with the fifth try:
2011-03-28 16: 04: 10,326 [worker 8] DEBUG NServiceBus.Unicast.UnicastBus [] - calling NServiceBus.SagaPersisters.NHibernate.NHibernateMessageModule 2011-03- on 28 'HandleEndMessage' 16: 04: 10,327 [Worker.8] debug NServiceBus.Unicast.UnicastBus [] - on Server.NHibernateSessionMessageModule 'HandleEndMessage' calling 2011-03- 28 16: 04: 10,341 [Worker.8] debug NServ iceBus.Unicast.UnicastBus [] - calling 'HandleError' NServiceBus.SagaPersisters.NHibernate.NHibernateMessageModule 2011-03-28 16: 04: 10,342 [Worker.8] debug NServiceBus. The maximum number of times a failed message - 10,344 [Worker.8] error NServiceBus.Unicast.Transport.Msmq.MsmqTransport []: 04: - Unicast.UnicastBus [] 2011-03-28 'HandleError' on 16 Server.NHibernateSessionMessageModule Calling permission, ID = 80cffd98-a5bd-43e0-a482-a2d96ca42b22 \ 20677 I do not not indicate why the message fails, and not me Know where to dig for more information / output. Configuration 'Endpoint' looks like this:
Public Zero Init () {container = Windsor.Container; . NServiceBus.Configure.With () CastleWindsor251Builder (container) .XmlSerializer () MsmqTransport () IsolationLevel (System.Transactions.IsolationLevel.Unspecified) .. Var masterInstaller = new notification server (); MasterInstaller.Install (container, blank); } The message handler is in fact fictitious at this level, and looks like this:
public class NewUserMessageHandler: IHandleMessages & LT; NotifyNewUserMessage & gt; {Private Readonly IGetUserQuery _getUserQuery; Public NewUserMandler (IGetUserQuery getUserQuery) {_getUserQuery = getUserQuery; } Public void handle (NotifyNewUserMessage message) {var result = _getUserQuery.Invoke (New GetUserRequest {id = new GUID ( "C10D0684-D25F-4E5E-A347-16F85DB7BFBF")}); Console.light line ("new message received: {0}", message user system id); }} If the first line is commented in the handler method, the message is processed only once.
I have received some posts / threads on the web (including stack overflow) which talk about such issues, especially and - but I have not had any success in removing my problem .
I have to be the most bound for any help. I am an n00b at NServiceBus!
NSVERBus is not handling it by default several times it will try again 5 times if the exception is , You can set it up in a config file. Have you turned on distributed transactions? Because you are working in a database and you have an open transaction (queue transaction) when you open another transaction, tries it and will renew it in a distributed transaction, I think this problem can be Have you run with the console app? You should see something from there.
Comments
Post a Comment