Correct Shutdown Procedure

126 views
Skip to first unread message

bearrito

unread,
Feb 12, 2012, 4:32:22 PM2/12/12
to masstransit-discuss
Hi to All,


My first post to the group so let me say thanks to all those
contributing to this project.

My question is this : what is the correct shutdown procedure for buses
using MSMQ multicast.

1. I am running a series of NUnit Test on my local machine that
publishes messages that are consumed by a client on a VM being run on
the same local machine.
2. I have not a problem publishing and receiving using this setup.
When the tests finish in my TestFixtureTearDown Method I call
bus.Dispose()
3. If I then run the same test suite, the remote bus does not receive
any of the subscription requests or messages.
4. If I restart the remote client and then run the tests the client
will receive the subscription requests and the messages.

My question concerns how to properly shutdown the bus instances so
that I can then restart the process without having to restart
processes on the other machine.

In test this is a nuisance in production it would mean recycling
processes on multiple machines if one process is restarted on any of
them.


Please let me know what I might be doing wrong or any code sections
that would be helpful.

Greg Brant

unread,
Feb 16, 2012, 9:29:58 AM2/16/12
to masstransit-discuss
bump

j.barrett strausser

unread,
Feb 16, 2012, 10:58:33 AM2/16/12
to masstrans...@googlegroups.com
I actually figured out my issue last night. In case anyway else runs across this issue let me describe my scenario.

Configuration
1. Windows 7 x64 running VS 2010 (local).  On this machine I am running NUnit tests that create a bus using the Service Bus Configurator.
2. Windows Server 2008 R2 running a topshelf hosted windows service (remote machine). The bus is configured the same as in the nunit test. The service acts as API over a non-unit testable resource
3. All buses are using Multicast MSMQ, no control buses.
4. Firewalls have ports inbound and outbound open for PGM.

Operations
1. I would start the service and would see Peer Messages appear in both the console output for the service on remote and appear in the subscriptions queue on local.
2. I would execute my nunit tests. The peer messages would be popped  from the subscription queue and communication would proceed as expected.
3. If I would then immediately execute the tests again communication between local and remote would fail.

Resolution
1. It appears my local machine cannot broadcast multicast messages
2. I have had no problem sending multicast on a Windows Server 2008 machine.
3. I should note that the remote machine above is a guest hosted in virtualbox on the local machine so my issue appears to be specific to the Win 7 network stack or at least my configuration.



On Thu, Feb 16, 2012 at 9:29 AM, Greg Brant <gr...@gregbrant.com> wrote:
bump

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To post to this group, send email to masstrans...@googlegroups.com.
To unsubscribe from this group, send email to masstransit-dis...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/masstransit-discuss?hl=en.


jason turim

unread,
Feb 16, 2012, 11:35:55 AM2/16/12
to masstrans...@googlegroups.com
I wonder if that fact that there are multiple nics on your local machine is causing problems.  I know that MSMQ has a tough time in that scenario.  You may need to configure some binding rules.

j.barrett strausser

unread,
Feb 16, 2012, 3:43:56 PM2/16/12
to masstrans...@googlegroups.com
Thanks, I'll give this a look and let you know what the result is.

schaibaa

unread,
Feb 25, 2012, 10:52:21 AM2/25/12
to masstransit-discuss
Are you setting the 'network' option?

It took me a while to figure this out too.. Somewhere in the docs it
mentions that if you don't set the network, it uses your local machine
name.

On Feb 16, 3:43 pm, "j.barrett strausser"
<j.barrett.straus...@gmail.com> wrote:
> Thanks, I'll give this a look and let you know what the result is.
>
>
>
>
>
>
>
> On Thu, Feb 16, 2012 at 11:35 AM, jason turim <jason.tu...@gmail.com> wrote:
> > I wonder if that fact that there are multiple nics on your local machine
> > is causing problems.  I know that MSMQ has a tough time in that scenario.
> >  You may need to configure some binding rules.
>
> >https://www.google.com/search?rlz=1C1CHKZ_enUS459US459&sourceid=chrom...

j.barrett strausser

unread,
Feb 27, 2012, 4:55:13 PM2/27/12
to masstrans...@googlegroups.com
It's almost surely an issue with the network stack. I can use the same code + configuration on a machine with one logical adapter and it works, on another machine with > 1 logical adapters it fails.


-b

Michael Yarichuk

unread,
Feb 28, 2012, 2:35:48 AM2/28/12
to masstransit-discuss
Hi,
I've had an issue with messages not being set.
After reading some stuff on web, I have found that in my case it was
multiple NICs problem - all test machines that participated in my
tests had multiple NICs - either physical, or virtual  -  VMWare
network ones.
In my case registering the following values in key HKLM\SOFTWARE
\Microsoft\MSMQ\Parameters :
BindInterfaceIP => machines IP that is received when I ping machines
host name
MulticastBindIP => machines IP that is received when I ping machines
host name
and then restarting MSMQ service
solved this issue.

j.barrett strausser

unread,
Feb 28, 2012, 12:10:17 PM2/28/12
to masstrans...@googlegroups.com
This will probably solve my problem. Could you screenshot your reg settings? I'm not exactly following on what the key-name-value settings are.

מיכאל ירייצ'וק

unread,
Feb 29, 2012, 2:33:14 PM2/29/12
to masstrans...@googlegroups.com

j.barrett strausser

unread,
Feb 29, 2012, 2:35:12 PM2/29/12
to masstrans...@googlegroups.com
You are a legend. Going to try this out next time I'm working with MT on my workstation.
Reply all
Reply to author
Forward
0 new messages