|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
Using the C# code sample remotely |
« View previous topic :: View next topic » |
Author |
Message
|
Vitor |
Posted: Wed Jan 04, 2012 8:06 am Post subject: |
|
|
 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 |
|
 |
fjb_saper |
Posted: Wed Jan 04, 2012 9:09 am Post subject: |
|
|
 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 |
|
 |
exerk |
Posted: Wed Jan 04, 2012 12:21 pm Post subject: |
|
|
 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 |
|
 |
|
|
|
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
|
|
|
|