Author |
Message
|
JohnSmith |
Posted: Thu Apr 29, 2010 1:39 am Post subject: Sending/Receiving msgs to a remote QM using Message Broker |
|
|
Voyager
Joined: 17 Mar 2010 Posts: 86
|
Hi All,
We have to send a message using Message Broker to a queue manager running remotely. We do not have the Sender/Receiver channel connectivity to that box. Only way is to use the Server Connection Channel. But, know how to configure Message Broker to use server connection channel, I know a simple way is use Remote queue in your local queue manager and send it across. That would be server to server connection. But, what are the ways in which message broker behave as a client and connect to remote maching using server conn.
Any help??
Cheers! |
|
Back to top |
|
 |
zpat |
Posted: Thu Apr 29, 2010 2:48 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
I would have thought it easier and (and simpler to secure with SSL) to allow a Sender channel. All it needs is a Receiver channel defined at the other end, which takes 5 seconds to do.
Using a non-standard, inferior design to avoid the hassle of making a change elsewhere is not a good idea. To answer your question, you can't make the broker use a client channel with the MQOutput node.
Maybe you can set up a sender channel to a third queue manager which already has a sender channel to the final destination? |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Apr 29, 2010 3:45 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The only way to make Broker act as an MQ Client application without using a custom node is to use the JMS nodes. |
|
Back to top |
|
 |
JohnSmith |
Posted: Thu Apr 29, 2010 4:28 am Post subject: |
|
|
Voyager
Joined: 17 Mar 2010 Posts: 86
|
mqjeff wrote:
Quote: |
The only way to make Broker act as an MQ Client application without using a custom node is to use the JMS nodes. |
Thanks Jeff!
Does IBM has provided any samples on how to do the same as they have provided samples for many of their features.
Thanks |
|
Back to top |
|
 |
zpat |
Posted: Thu Apr 29, 2010 4:39 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
I can't imagine IBM has a sample for using MQ client via JMS in the broker since it would generally be a hard way to solve an easy problem. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Apr 29, 2010 5:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
JohnSmith wrote: |
Does IBM has provided any samples on how to do the same as they have provided samples for many of their features.
|
This isn't a WMB feature; it's a workround to deal with what I assume to be a political issue in your environment.
If you do start using client connection inside WMB, make sure both the flow & the JMS can handle dropped connections & transactionality issues. The broker engine won't fully understand what's happening & you'll need to cover all the scenarios. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
JohnSmith |
Posted: Fri Apr 30, 2010 12:39 am Post subject: |
|
|
Voyager
Joined: 17 Mar 2010 Posts: 86
|
Thanks Jeff.
well I will start working on it and will keep updated how it goes.
Regards
Last edited by JohnSmith on Fri Apr 30, 2010 3:10 am; edited 1 time in total |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Apr 30, 2010 2:11 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
If a 'direct' MQ-MQ connection is not politically acceptable then why not look at the MQIPT support pack and suggesting it as an indirect solution. After all, it can use http/https and I have known that this was acceptable in places that really didn't grok what WMQ is all about. _________________ 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 |
|
 |
JohnSmith |
Posted: Fri Apr 30, 2010 4:21 am Post subject: |
|
|
Voyager
Joined: 17 Mar 2010 Posts: 86
|
Well, a new problem popped up. We somehow came to an agreement to use the sender/receiver channel pair to send the message. But, when the message arrived in the HOST queue it is throwing an excepting while reading the message. Below is the error shown -
java.lang.ClassCastException: com.ibm.jms.JMSBytesMessage
Now, we found a link which says much about this problem -
http://www-01.ibm.com/support/docview.wss?uid=swg21220378
in summary it says that "The problem occurs when a JMS message header is missing from a message"
It means we are missing an header from the message, but how come we can add the header using the message broker. We are directly putting the message into the queue.
Any suggestions? |
|
Back to top |
|
 |
zpat |
Posted: Fri Apr 30, 2010 4:42 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
For cross-platform messaging to z/OS it is normally safer to use MQMD.Format of MQSTR (or the symbolic MQFMT_STRING).
Ensure the MQMD.CCSID values matches the code page of the actual message data and all should be well.
Unless of course this receiving application actually wants only RFH2 headers, in which case set one of these, e.g. in a MQHeader node. |
|
Back to top |
|
 |
JohnSmith |
Posted: Fri Apr 30, 2010 5:31 am Post subject: |
|
|
Voyager
Joined: 17 Mar 2010 Posts: 86
|
Quote: |
For cross-platform messaging to z/OS it is normally safer to use MQMD.Format of MQSTR (or the symbolic MQFMT_STRING).
Ensure the MQMD.CCSID values matches the code page of the actual message data and all should be well.
Unless of course this receiving application actually wants only RFH2 headers, in which case set one of these, e.g. in a MQHeader node. |
Hi Zpat, it has nothing to do with mainframe, and it looks very unlikely that it is a problem related to CCSID or encoding. As the error says
JMS message header is missing from a message , I think something is do with JMS but I also dont understand is it is causing problem, my message is a simple one with MQ header in it(MQMD, RFH etc.) whereas their application is a MDB running application using JMS client to pick up messages from queue. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Apr 30, 2010 7:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
JohnSmith wrote: |
how come we can add the header using the message broker. |
You write code to insert the header into the message tree.
JohnSmith wrote: |
We are directly putting the message into the queue.
|
Do you mean directly with a JCN or are you letting the MQOutput node do the heavy lifting for you? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Fri Apr 30, 2010 10:04 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Is it a JMS message or not? Use RFHUTILC to examine it on a local queue. Should it be a JMS message or not?
I seem to vaguely remember some WMB nodes that can add or remove JMS headers.
Requiring JMS specific messages is not an ideal practice but luckily the broker can mediate and sort it out.
You haven't really said what the origin of the message is (before WMB) or shown us the MQMD contents. |
|
Back to top |
|
 |
JohnSmith |
Posted: Sun May 02, 2010 7:18 am Post subject: |
|
|
Voyager
Joined: 17 Mar 2010 Posts: 86
|
Quote: |
The only way to make Broker act as an MQ Client application without using a custom node is to use the JMS nodes. |
Jeff, Can't we use MQSERVER environment variable setup on our system and then putting the message to the queue using broker. In that case it should internally pick that environment variable and put it into the queue.
I tried that but was getting "2085(object not found)", it means it is not able to resolve the environment variable MQSERVER. But, what could be the reason for the same??
Regards, |
|
Back to top |
|
 |
zpat |
Posted: Sun May 02, 2010 8:00 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
MQSERVER is used by MQ client, Broker uses a bindings connection to the queue manager. It is not a MQ client. |
|
Back to top |
|
 |
|