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 IBM MQ Support » Using the C# code sample remotely

Post new topic  Reply to topic Goto page Previous  1, 2, 3
 Using the C# code sample remotely « View previous topic :: View next topic » 
Author Message
Vitor
PostPosted: Wed Jan 04, 2012 8:06 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

fishlips wrote:
I have been tasked with writing some code, in .NET, which will establish a remote connection to the Queue Manager, connect to a specified queue, read the messages delivered by our customer, and write the content into flat files.


BTW there are products that do this for you. If it's really as straightforward as you indicate a few simple edits of amqsgetc will achieve this (once you've got the client configuration correct).
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jan 04, 2012 9:09 am    Post subject: Reply with quote

Grand High Poobah

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

Quote:
I have been tasked with writing some code, in .NET, which will establish a remote connection to the Queue Manager, connect to a specified queue, read the messages delivered by our customer, and write the content into flat files. The C# sample provided with MQ, SampleConsumerCS.exe, clearly appears to do this, but I can only get it to work on the MQ Server, not from another machine.

This leads me to believe you are using XMS and not straight MQI.
So for your connection factory, you will need to specify:
  • hostname
  • channel
  • port
  • transport type (MQ_CLIENT_TCPIP)

QMGR name becomes optional at this point.


Alternatively you could also just specify the file URL for the channel table if you have set up a CCDT. (Client Channel Definition Table).

And then read up on the Clients manual in the infocenter.
There are multiple ways of setting up a client connection:
  • native JMS/XMS setup as I have described above
  • JNDI
  • CCDT

  • native MQI

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
exerk
PostPosted: Wed Jan 04, 2012 12:21 pm    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

And not forgetting that unmanaged .Net clients can utilise an mqlcient.ini file to specify the CCDT file and its location, and SSL key store (CMS) and its location.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3 Page 3 of 3

MQSeries.net Forum Index » General IBM MQ Support » Using the C# code sample remotely
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.