Yesterday I did a production simulation. The results where not good. The connection between the two servers is OK. From time to time there is huge delay, about 5-10 minutes. I send a message, two, three.. twenty and the other side do not receives them. And then boom, all messages are there and the reply is send to the sender. The other situation is when I send 10 messages, the other side receives them momentarily and replies. But the replies are not received by the sender. After 5-10 minutes BOOM, the replies are here.
What is goin on. please help me.
====================
EDIT:
Both servers are windows XP sp3. Both computers are connected with openVPN.
NSB is the latest version.
UI <= duplex => applicaiton server <= publish/subscribe => Denormalizer(readonly database)
Yesterday I tested only the duplex. In a 1PC environment everything goes smoothly. When the duplex is ready I will test the 3rd part.
Do you use active directory? I remember reading that AD can cause issues with MSMQ. Something along the lines of some lookup tables being huge and slowing down things... Anyway can't remember precisely, but just a thought.
Otherwise, I suggest starting with having both endpoints on 1 computer, and working from there. Slowly add variables until it breaks again.
EDIT: Try adding this line to your config:
.RunCustomAction(() => NServiceBus.Configure.Instance.Configurer.ConfigureProperty<MsmqTransport>(
mt => mt.SecondsToWaitForMessage, 2))
I'm not sure how you go about configuring this if you are using the host though. My config looks like:
_Bus = NServiceBus.Configure.With()
.DefaultBuilder()
.Log4Net(new MyLogAppender())
.XmlSerializer()
.MsmqTransport()
.IsTransactional(true)
.PurgeOnStartup(true)
.UnicastBus()
.ImpersonateSender(false)
.DoNotAutoSubscribe()
.LoadMessageHandlers()
.RunCustomAction(() =>
NServiceBus.Configure.Instance.Configurer.ConfigureProperty<MsmqTransport>(
mt => mt.SecondsToWaitForMessage, 2))
.CreateBus()
.Start();
I have an issue where my MSMQ queues will timeout regularly, creating delay that way. However the default timeout is only in the seconds (15 seconds iirc?). Never been able to work out why it is happening, I think it is something funny in the MSMQ libraries. I really doubt the same issue would cause 10min+ delays, but it's worth a try.