Author |
Message
|
archana123 |
Posted: Wed Aug 12, 2015 8:20 pm Post subject: Access MQ message in java compute node |
|
|
Novice
Joined: 21 Jul 2015 Posts: 14
|
Hi I am a newbie.
How can I fetch messages present in MQ from a java compute node. i.e., I need the java code to fetch messages from MQ . I need to refine these messages in java compute node and then send that as an email content.
Could you please help me with it.
Thanks in advance |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Aug 12, 2015 10:24 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
don't do it.
Broker is not a J2EE environment.
how are you getting into the JCN in the first place? What event / piece of magic happened to allow your flow to cal use the JCN in the first place? _________________ 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 |
|
 |
zpat |
Posted: Wed Aug 12, 2015 11:12 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
The message flow will get each message using the MQINPUT node, it can manipulate the content (as needed) in a mapping node or compute node (preferable to JCN) and then send it as email using EMAIL output node.
Do nothing other than field manipulation in a compute node (and only then if a mapping node can't be used). _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Aug 13, 2015 2:34 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
And if your design absolutely requires you to pickup a message from a different queue, think MQGET node!
And please, please don't wire any nodes in a loop  _________________ MQ & Broker admin |
|
Back to top |
|
 |
archana123 |
Posted: Thu Aug 13, 2015 4:33 am Post subject: |
|
|
Novice
Joined: 21 Jul 2015 Posts: 14
|
Issue that I face is I am able to view the messages from MQExplorer. But I am not able to get that to next level. I will give it a try with your suggestion now and reply soon. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Aug 13, 2015 5:19 am Post subject: Re: Access MQ message in java compute node |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
archana123 wrote: |
I need the java code to fetch messages from MQ . |
No you don't, no more than you needed to do an sftp from your JCN. You were advised in your earlier thread here to use the features of IIB and not just pretend IIB = WAS.
archana123 wrote: |
Issue that I face is I am able to view the messages from MQExplorer. But I am not able to get that to next level. |
What "next level"? If you're staring at the Toolkit pallet wondering how to get messages into a flow, that's the first level not the next level!
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Aug 13, 2015 5:48 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
IIB comes with many sample applications.
They have lots of documentation and description of what they do.
They have full source available with them - the entire flow including the wired up nodes and all of the source for all of the transformation nodes in that flow.
They can be easily imported into your toolkit.
They can even easier be imported and RAN in your local testing environment. One Click Happiness!
It is said that a newbie program spends 90% of their time reading and thinking and 10% of their time coding. A mid level programmer spends 10% of their time reading and thinking, and 90% coding. An advanced programmer spends 90% of their time reading and thinking, and 10% of their time programming. |
|
Back to top |
|
 |
archana123 |
Posted: Thu Aug 13, 2015 8:31 am Post subject: |
|
|
Novice
Joined: 21 Jul 2015 Posts: 14
|
Thank you all. MQGet node solved my problem(Initially I was playing around with my MQ Input Node...and I don't know why I was not able to get it through...). Only issue that I face now is that I am just able to get the MQ message as an attachment to my mail and not in the subject. I will have to figure that out some how. Anyway I am able to get the MQ message in my email attachment now.
Thank you all |
|
Back to top |
|
 |
Vitor |
Posted: Thu Aug 13, 2015 8:45 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
archana123 wrote: |
I am just able to get the MQ message as an attachment to my mail and not in the subject. |
I think you mean the body.
archana123 wrote: |
I will have to figure that out some how. |
Fix your code. Seriously. The message contents go where you put them.
archana123 wrote: |
MQGet node solved my problem(Initially I was playing around with my MQ Input Node |
So what starts your flow running?
I do hope you're not reading one message after the other in the same flow instance with the MQGet node. My worthy associate explicitly warned you against doing that for good reason. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
inMo |
Posted: Thu Aug 13, 2015 9:07 am Post subject: |
|
|
 Master
Joined: 27 Jun 2009 Posts: 216 Location: NY
|
Based on this thread, it sounds like your effort has the potential to be problematic. So much so, that I am concerned you won't realize what problems exist before it is deemed complete. Perhaps it would be best if you posted a description of the requirements so you could get appropriate help. |
|
Back to top |
|
 |
|