Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2005

Tip: Looking for answers? Try searching our database.

MessageQueue with unstable network connections

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alexander Oldemeier - 29 Jul 2005 11:09 GMT
Hi there. Does anyone have an idea how to manage a MessageQueue used to
receive messages asynchronously from a remote computer in an environment
where the network connection may be down sometimes?
The problem I experienced was that the MessageQueue object seems to be
nonfunctional even after the network connection is back again. When I try to
dispose and recreate the MessageQueue object when the connection is back it
still does not work (EndReceive raises an exception) - so after the
connection is down one time, I have no chance to read from the same queue
until I restart the application. I use C# with VS.NET 2003. Thanks for any
hints
Alex
David Browne - 29 Jul 2005 16:10 GMT
> Hi there. Does anyone have an idea how to manage a MessageQueue used to
> receive messages asynchronously from a remote computer in an environment
[quoted text clipped - 6 lines]
> queue until I restart the application. I use C# with VS.NET 2003. Thanks
> for any hints

The workaround is to turnn off the MessageQueue.EnableConnectionCache =
false.  This will force a new connection each time.

You should do this whenever you are doing remote receives across anything
more than a server room switch.

But MSMQ is designed to work transparently across unstable connections.  But
to take advantage of its reliable messaging capabilities you must follow
proper message queueing procedures.  The rule is "Remote Sends and Local
Recieves".  Have the remote machine send it back to a local queue for you.
This is what the Message.ResponseQueue property is for.

When you send a message to a remote queue, it goes into a local outgoing
queue and is sent as soon as a network connection is available.  So, so long
as all messages are sent to a remote queue to be locally received, you have
guaranteed delivery across unreliable networks.

David

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.