2
votes

We have a couple of services where we use nservicebus for something like:

Whenever we use that one sevice's function call, say "SendMessageToService2()", we use the function below to get an instance of a static bus member to send a message to the queue of Service2.

Publisher.GetInstance().Send()

This is fine, but only after succeeding message sends. But for the first try.. it's slow and causes our service to fail its local timeout setting. The same goes for when the service/system has been idle for like a day, then when we fire up a message.. it's slow again, but on the next try it goes back to normal.

I've done some reading but only stumbled upon MSMQ registries.. the idleTimeout seems to point to something interesting I haven't done this as of now..

We're using NServiceBus 3.0 btw..

Any ideas/same experiences?

1

1 Answers

2
votes

From an MSMQ perspective, if the first message is slow then most times it is a name resolution delay. That is, it is taking a long time to resolve destination name to an IP address. Once resolved, Windows caches the information and so subsequent connections are much quicker. Network trace may prove if this is the case or not.

Cheers
John Breakwell