PDA

View Full Version : Message bus no stopping when application stops?



volga
Aug 26th, 2008, 04:23 PM
Hi,

I have four applications (let's call them S1, S2, M
and P), all running a message bus. P send messages to M through a point to point channel (over RMI). M resends the messages using a publish/subscribe channel. S1 and S2 are subscribers (also using RMI) to M channels.

The problem, is that when I stop application M, messages continue to go from P to S1 and S2 and if I restart M, S1 and S2 stop receiving messages.

This seems strange. Can the message bus in application M continue working even when the application has stopped? (All applications are running as Eclipse projects, inside Eclipse.)

iwein
Aug 28th, 2008, 02:19 AM
This seems strange indeed, can you post code so we can give it a go? (you can also just zip up the projects if you want)

volga
Aug 28th, 2008, 11:36 AM
It will be difficult to send the whole project. I might ry to make a little example to isolate the problem.

However, I realized that I had used the same channel names to communicate between application P and M on one side, and M and S1, S2 on the other side. When I changed the channel name, the problem disapeared.

May be it's is normal that application P and S1, S2 continue comunicating when M is down if the channel names are the same. If this is the case, it just means that I have not completly understood how things are supposed to work;-)

I must add that I am usingRMI gateways and handlers, with a separate registry (same registry for all four applications)

iwein
Aug 28th, 2008, 11:37 PM
It sounds like you fixed the problem with that. If you find something that is still not making sense to you we still love to hear about it of course.