ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » Clustering » Clustering with .NET

Post new topic  Reply to topic
 Clustering with .NET « View previous topic :: View next topic » 
Author Message
barknee
PostPosted: Wed May 25, 2005 10:53 am    Post subject: Clustering with .NET Reply with quote

Newbie

Joined: 25 May 2005
Posts: 5

I am trying to connect to a clustered queue manager and cannot get a connection without naming the queue manager explicitly. Here is the code I am using and any help will be appreciated. Everything is running locally.

thanks

Code:

MQEnvironment.Hostname = Environment.MachineName;
MQEnvironment.Port = 10000;
MQEnvironment.Channel = "TO_QM1";
MQQueueManager qm = new MQQueueManager("");
MQQueue q = qm.AccessQueue("queue1", MQC.MQOO_OUTPUT | MQC.MQOO_BIND_NOT_FIXED, null, null, null);

Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed May 25, 2005 10:59 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

There's nothing different about connecting to a clustered queue manager than a regular queue manager...

So this isn't a clustering question...

What return code do you get for the code you posted?

EDIT:

Also, is "TO_QM1" a Server Connection Channel? It's not named like one, if it is.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
barknee
PostPosted: Wed May 25, 2005 11:12 am    Post subject: Reply with quote

Newbie

Joined: 25 May 2005
Posts: 5

I am new to MQSeries so I thought that with clustering you do not have to specify the queue manager explicitly?

I think this fixed it. I was using the wrong channel. Is there anywhere in the docs (any docs) that explain this? I did not know if was a server connection channel that needed to be specified.

Now, another question

SYSTEM.DEF.SVRCONN -- SYSTEM.AUTO.SVRCONN

What is the difference? And after that, if it makes sense, can auto be used?

Thanks a lot
Back to top
View user's profile Send private message
vennela
PostPosted: Wed May 25, 2005 11:18 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Those are automatically defined channels when creating the QMGR.
You could name something like YOURAPP.SVRCONN
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jefflowrey
PostPosted: Wed May 25, 2005 11:19 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

barknee wrote:
I am new to MQSeries so I thought that with clustering you do not have to specify the queue manager explicitly?


No. A Cluster is not a real object that can be connected to - it's a set of properties and services in a queue manager object.

You must always connect to a particular queue manager explicitly by either it's client address (network address, port, channel name) or it's server address (Queue Manager name), depending on where your program is running and how you want it to bind.

Since you are "new to MQ", then you should also know that you can't GET from queues that are not qlocal to the queue manager you are connected to. Clustering doesn't change this.

Also, MQ Clustering is not a failover solution. It's a load-balancing and administrative simplification solution.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
barknee
PostPosted: Wed May 25, 2005 11:25 am    Post subject: Reply with quote

Newbie

Joined: 25 May 2005
Posts: 5

Thanks. Makes sense. Ok, last one, and I know this is a config issue. I spawn multiple threads to hammer the queues, however the first QM always takes the message. IE, the other local queues never see the messages. The threads are created on a hyperthreaded box but I fill the queue first and the messages never make it to the other queues.

Like i said I am sure this is config.
Thanks again.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed May 25, 2005 11:35 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It's not config. It's default workload balancing.

In version 5, the local queue manager is always chosen if it hosts a copy of the queue you are putting to.

One approach to this is to have separate QMs for putting and getting - with no queues defined on the putting QM.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
barknee
PostPosted: Wed May 25, 2005 11:39 am    Post subject: Reply with quote

Newbie

Joined: 25 May 2005
Posts: 5

You rock. I just checked that. I removed the clustered queue from the default QM and it worked like a charm.

thanks for your help again. This has been eating at me for hours.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Wed May 25, 2005 2:02 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

barknee wrote:
I think this fixed it. I was using the wrong channel. Is there anywhere in the docs (any docs) that explain this? I did not know if was a server connection channel that needed to be specified.


Peep the MQClient Manual. It has all the details on how MQClients connect to QMs.
Also, there is a manual just for .NET.

Both can be accessed via the documentation button at the top of this screen. Look up -
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed May 25, 2005 4:03 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

PeterPotkay wrote:
Both can be accessed via the documentation button at the top of this screen. Look up -


Actually, unless the sublinks work - which I don't see because of my browsers of choice - the documentation button is currently pointing to the wrong page at ibm.com.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
vennela
PostPosted: Wed May 25, 2005 4:42 pm    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

jefflowrey wrote:
PeterPotkay wrote:
Both can be accessed via the documentation button at the top of this screen. Look up -


Actually, unless the sublinks work - which I don't see because of my browsers of choice - the documentation button is currently pointing to the wrong page at ibm.com.


Works OK for me.

Are you using IE? If yes then try clearing history and try again.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jefflowrey
PostPosted: Wed May 25, 2005 6:09 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

vennela wrote:
Works OK for me.

When clicking on the main button, I get http://www-306.ibm.com/software/integration/wmq/library/manualsa/index.html

vennela wrote:
Are you using IE? If yes then try clearing history and try again.

If I were using IE, I would get the popup menu. I'm using Firefox - currently on an environment that only supports MQ via a third party port. And it's not NSK!
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed May 25, 2005 6:37 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Jeff the link has changed
as per IBM FAQ: http://www-306.ibm.com/software/integration/mqfamily/library/manualsa/
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Thu May 26, 2005 3:27 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

fjb_saper wrote:
Jeff the link has changed


I know that. But the 'documentation' button that I get doesn't.


EDIT:
In fact, here's the HTML I get when I view source
<td><a target="_blank" href="http://www-3.ibm.com/software/ts/mqseries/library/manualsa/index.html" onMouseover="showDDNav('document.all[\'support\']','document.layers[\'support\']')" onMouseout="hideDDNav('document.all[\'support\']','document.layers[\'support\']')"><img src="http://www.mqseries.net/navbar/documentation.gif" width="123" height="19" alt="" border="0"></a></td>
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
barknee
PostPosted: Thu May 26, 2005 4:45 am    Post subject: Reply with quote

Newbie

Joined: 25 May 2005
Posts: 5

Thanks for all of your help. I must say that I have read through the clustering docs, the .NET docs and the API doc(some of that) and I think IBM's tech writers suck. I have had to resort to PInvoke many times in .NET to get this stuff to work to find out the options that have to be passed around to get it to work. For example, the MQOD structure is very vague in the docs and they also do not go into the object descriptor information either. Anyway, I am having to write for this, MSMQ and Tuxedo all in one so it has to be done. Again thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Clustering » Clustering with .NET
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.