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 » WebSphere Message Broker (ACE) Support » Access MQ message in java compute node

Post new topic  Reply to topic
 Access MQ message in java compute node « View previous topic :: View next topic » 
Author Message
archana123
PostPosted: Wed Aug 12, 2015 8:20 pm    Post subject: Access MQ message in java compute node Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Wed Aug 12, 2015 10:24 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.

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
View user's profile Send private message
zpat
PostPosted: Wed Aug 12, 2015 11:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Thu Aug 13, 2015 2:34 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
archana123
PostPosted: Thu Aug 13, 2015 4:33 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Thu Aug 13, 2015 5:19 am    Post subject: Re: Access MQ message in java compute node Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Thu Aug 13, 2015 5:48 am    Post subject: Reply with quote

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
View user's profile Send private message
archana123
PostPosted: Thu Aug 13, 2015 8:31 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Thu Aug 13, 2015 8:45 am    Post subject: Reply with quote

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
View user's profile Send private message
inMo
PostPosted: Thu Aug 13, 2015 9:07 am    Post subject: Reply with quote

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
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 » WebSphere Message Broker (ACE) Support » Access MQ message in java compute node
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.