|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
.NET API and system clustering |
« View previous topic :: View next topic » |
Author |
Message
|
doug |
Posted: Wed Jan 25, 2006 2:31 am Post subject: .NET API and system clustering |
|
|
Novice
Joined: 27 May 2003 Posts: 11
|
I have an application written in C# using the .NET API (on a MQ 5.3 CSD 7 client) that connects to a remote queue manager and retrieves messages. If the connection to the queue manager is lost, the app will periodically retry to reopen the connection.
I've seen a problem when the queue manager is on a cluster (an OS cluster, not an MQ one). If the queue manager fails over to a different node in the cluster, my app will never regain the connection to the queue manager. The situation is only resolved if the app is restarted, or apparently if the queue manager fails back over to the original node.
It seems as though some details of the connection (the physical rather than the virtual IP address of the cluster node perhaps) must be cached somewhere, even though the MQQueueManager object is destroyed when the connection is lost.
The .NET APIs don't seem to support Dispose to force garbage collection, which would probably help in having some control over clean up. Is there anything more I can do to "forget" the old connection? Would migrating to a V6 client improve matters at all?
Thanks,
Doug Duthie |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Feb 19, 2006 9:27 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
What have you tried so far?
Did you try if creating a new instance of the MQEnvironment class would help?
[comment] I know this is somewhat old but was listed with no responses[/comment]
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
PeterPotkay |
Posted: Sun Feb 19, 2006 4:06 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
CSD7 stil had some .NET bugs in the .NET dll, so definitly upgrade.
I have VB.NET MQ Client code that handles a QM failing over between nodes no problem.
I would be surprised if this an MQ problem. Something else is caching that originally IP address I bet.
That assumes your code truly does drop into a section of that code that tries to reconnect from scratch if the connection is lost. You are not just trying to use the old invalid QM object over and over, are you? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
doug |
Posted: Mon Feb 20, 2006 1:10 am Post subject: |
|
|
Novice
Joined: 27 May 2003 Posts: 11
|
Thanks for your responses guys.
The QM object is destroyed when a connection is lost and a new one created when a new connection is attempted (ie - I never try to reuse one). Forgive me if I'm being a bit dim (it is early Monday morning and I'm a bit bleary eyed), but I didn't think it was possible to created a new instance of MQEnvironment - it has no constructor and its properties are all static.
It is possible that something else is caching the IP address, however the client maintains that restarting the app allows a connection to be regained. Unfortunately, I can't recreate the environment locally and I only hear the symptoms third hand.
I'll upgrade to 5.3 CSD 12 as some preventative medicine and see if this improves matters |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon Feb 20, 2006 5:28 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
doug wrote: |
Forgive me if I'm being a bit dim (it is early Monday morning and I'm a bit bleary eyed), but I didn't think it was possible to created a new instance of MQEnvironment - it has no constructor and its properties are all static.
|
Code: |
Dim myHashTable As New Hashtable
myHashTable.Add(IBM.WMQ.MQC.HOST_NAME_PROPERTY, TheHostName)
myHashTable.Add(IBM.WMQ.MQC.PORT_PROPERTY, ThePort)
myHashTable.Add(IBM.WMQ.MQC.CHANNEL_PROPERTY, TheChannelName)
myQM = New MQQueueManager(" ", myHashTable)
|
Everytime the above code executes, it creates a new hashtable. I use the above method to connect to multiple QMs at the same time (little monitoring tool I wrote). _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
doug |
Posted: Mon Feb 20, 2006 5:51 am Post subject: |
|
|
Novice
Joined: 27 May 2003 Posts: 11
|
I managed to completely miss that when going through the documentation. I'll give it a try.
Thanks for the tip Peter |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|