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 » General Discussion » Get messages from remote queue

Post new topic  Reply to topic
 Get messages from remote queue « View previous topic :: View next topic » 
Author Message
nnarkar
PostPosted: Fri Feb 10, 2017 11:55 am    Post subject: Get messages from remote queue Reply with quote

Newbie

Joined: 10 Feb 2017
Posts: 5

Team,

I am attempting to get messages from one of our partner's queue. Their MQ server is outside of our organization and outside of our company's domain. They have provided us with their MQ server ip address, port number, queue name, channel name. In addition they have provided us with their user name and password to connect and retrieve messages from the queue. I have tried to run the SimpleGet application that IBM provides as a part of their samples but I keep getting a 2059 - MQRC_Q_MGR_NOT_AVAILABLE error. I have tried to assign the user and password provided by the client alternatively to the properties MQC.MQCACH_MCA_USER_ID and MQC.MQCACH_PASSWORD and
MQC.USER_ID_PROPERTY and MQC.PASSWORD_PROPERTY but I still get the MQRC_Q_MGR_NOT_AVAILABLE error. I am running the SimpleGet utility on the windows machine so .NET framework is involved. I have attached sample code below. Can someone point me to what I could be doing wrong

Code:
                properties = new Hashtable();
                properties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_MANAGED);
                properties.Add(MQC.HOST_NAME_PROPERTY, hostName);
                properties.Add(MQC.PORT_PROPERTY, port);
                properties.Add(MQC.CHANNEL_PROPERTY, channelName);

                //properties.Add(MQC.MQCACH_MCA_USER_ID, "userid");
                //properties.Add(MQC.MQCACH_PASSWORD, "password");

                properties.Add(MQC.USER_ID_PROPERTY, "userid");
                properties.Add(MQC.PASSWORD_PROPERTY, "password");

                queueManagerName = "QueueManagerName";
                // display all details
                Console.WriteLine("MQ Parameters");
                Console.WriteLine("1) queueManagerName = " + queueManagerName);
                Console.WriteLine("1) queueName = " + queueName);
                Console.WriteLine("2) host = " + hostName);
                Console.WriteLine("3) port = " + port);
                Console.WriteLine("4) channel = " + channelName);
                Console.WriteLine("5) numberOfMsgs = " + numberOfMsgs);
                Console.WriteLine("");

                // create connection
                Console.Write("Connecting to queue manager.. ");
               
                queueManager = new MQQueueManager(queueManagerName, properties);
queue = queueManager.AccessQueue(queueName, MQC.MQOO_INPUT_AS_Q_DEF + MQC.MQOO_FAIL_IF_QUIESCING);
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Feb 10, 2017 12:02 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Have you even tried accessing the remore queue with one of the supplies applications?

eg

amqsgetc

Note the 'c' which stands for a client app.

you can use the features of MQ to setup the method of access. Once you are sure about being able to access the queue you can try to debug your code.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
nnarkar
PostPosted: Fri Feb 10, 2017 12:17 pm    Post subject: Reply with quote

Newbie

Joined: 10 Feb 2017
Posts: 5

Hello smdavies99,

Not sure how to use amqsgetc to connect to remote server\queue. Do you have any examples handy to share ?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Feb 10, 2017 1:21 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

nnarkar wrote:
Hello smdavies99,

Not sure how to use amqsgetc to connect to remote server\queue. Do you have any examples handy to share ?


There are many, many discussions on this forum about using amqsgetc.

The google search facility is your friend. It is on the upper right of this page.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Fri Feb 10, 2017 2:38 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7717

Do you have network connectivity to their IP address and that specific port? If yes, how do you know you have this connectivity?
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
nnarkar
PostPosted: Fri Feb 10, 2017 2:39 pm    Post subject: Reply with quote

Newbie

Joined: 10 Feb 2017
Posts: 5

Hey Peter,

I am able to telnet using the ip and port number they have provided.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Feb 10, 2017 9:08 pm    Post subject: Reply with quote

Grand High Poobah

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

You did not specify the version of the qmgr you are trying to connect to.
I would suggest you contact their MQ Admin person and ask them to create the proper chlauth record for you to access their queue manager.

On the other hand see if there is something like CMQC.MQTRANSPORT_MQCLIENT_MANAGED and may be that would take care of your current problem.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
gbaddeley
PostPosted: Sun Feb 12, 2017 4:31 pm    Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2492
Location: Melbourne, Australia

BTW, the thread topic is a bit misleading. I read it as "get messages from a Remote Queue object", which is of course impossible.

You can also use the sample program "amqscnxc" that does a connection test, to verify that the host, port, channel combination works, without involving a queue name.
_________________
Glenn
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 » General Discussion » Get messages from remote queue
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.