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 » Can we put different msgs on diff. queues via Java Compute??

Post new topic  Reply to topic Goto page 1, 2  Next
 Can we put different msgs on diff. queues via Java Compute?? « View previous topic :: View next topic » 
Author Message
wisemind
PostPosted: Tue Aug 31, 2010 8:54 am    Post subject: Can we put different msgs on diff. queues via Java Compute?? Reply with quote

Apprentice

Joined: 16 Jun 2010
Posts: 29

Hello ,

I am using Message Broker V 6.1.0.3. I want to put different messages in different queues using Java Compute Node. The thing i want is to execute messages on same time with different output nodes of java compute Node.

thanks.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Aug 31, 2010 8:57 am    Post subject: Re: Can we put different msgs on diff. queues via Java Compu Reply with quote

Grand High Poobah

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

wisemind wrote:
I want to put different messages in different queues using Java Compute Node.


That's as easy as doing it with an ESQL Compute node if you use the facilities of WMB. The better question is why you want to put messages directly to a queue from inside a JCN rather than using WMB, with all the extra trouble this will cause.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Aug 31, 2010 9:09 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

What does it mean "execute messages on same time"?
Back to top
View user's profile Send private message
wisemind
PostPosted: Tue Aug 31, 2010 9:17 am    Post subject: Reply with quote

Apprentice

Joined: 16 Jun 2010
Posts: 29

Thanks for your quick response!

Well i am unable to understand what do you mean by use the facilities of WMB?? I am using WebSphere Message Broker. Inside this i am using Java Compute Node that generate XML messages from the incoming txt File. Actually I have different Components that reads the message from different queues. And Queues messages should be generated from the java compute Node.

The thing i want is to send xml messages to 2 different queues . Can you tell me how can i do this??

Well execute messages on same time means , i want to put the messages at the same time as generated JCN.

Thanks
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Aug 31, 2010 9:17 am    Post subject: Reply with quote

Grand High Poobah

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

mqjeff wrote:
What does it mean "execute messages on same time"?


I was going to get to that later. Having established why the messages were being put from within the JCN, then we'd move to the difficulties of running a UoW outside WMB's control (thereby executing the messages at the same time by committing them simultaniously).
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Aug 31, 2010 9:19 am    Post subject: Reply with quote

Grand High Poobah

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

wisemind wrote:
The thing i want is to send xml messages to 2 different queues . Can you tell me how can i do this??


Use 2 MQOutput nodes or 1 MQOutput node with a destination list.

wisemind wrote:
Well execute messages on same time means , i want to put the messages at the same time as generated JCN.


What makes you think this wouldn't happen?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
wisemind
PostPosted: Tue Aug 31, 2010 9:27 am    Post subject: Reply with quote

Apprentice

Joined: 16 Jun 2010
Posts: 29

So how can we describe inside the JCN that, In which MQ Node you have to put what message???

I am using the following way in JCN.


MbMessage outMessage = new MbMessage(inMessage);
MbElement elements= null;
outMessage = new MbMessage();

try {
MbMessageAssembly outAssembly = new MbMessageAssembly(contact admin,outMessage);
outMessage.getRootElement().createElementAsLastChild("XMLNSC");
MbElement pro = outMessage.getRootElement().getFirstChild();
MbElement pro1 = pro.getFirstChild();
pro1.getNextSibling().getNextSibling().setValue("XML1");
elements = outMessage.getRootElement().createElementAsLastChild(MbXMLNS.PARSER_NAME);
elements = elements.createElementAsFirstChild(MbElement.TYPE_NAME, "in:GetData", null);
elements.createElementAsFirstChild(MbXMLNS.ASIS_ELEMENT_CONTENT, null, "");
elements.createElementAsLastChild(MbXMLNS.ATTRIBUTE, "xmlns:in", "http://abc/abc");
elements = elements.createElementAsFirstChild(MbXMLNS.ELEMENT, "ProcessInput", null);
elements = elements.createElementAsFirstChild(MbXMLNS.ELEMENT, "MSISDN", "a");

MbElement outRoot = outMessage.getRootElement();
MbElement mqmd = outRoot.getFirstChild().createElementAfter("MQHMD");
mqmd.createElementAsFirstChild(MbElement.TYPE_NAME_VALUE,"Format","");
outMessage.finalizeMessage(MbMessage.FINALIZE_NONE);
out.propagate(outAssembly);


////




Thanks.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Aug 31, 2010 9:54 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

This is basic use of the product.

Look at the Message Routing Sample.

Go back to the training materials you received during the class you took on using message broker - or go back to the more senior person you are working with who is getting paid to provide you with mentoring and training.

We're not a training resource.
Back to top
View user's profile Send private message
wisemind
PostPosted: Tue Aug 31, 2010 10:01 am    Post subject: Reply with quote

Apprentice

Joined: 16 Jun 2010
Posts: 29

I have already seen that sample. But thats describe the ESQL Node not JCN.

Well Cant you provide me a link where i can write messages to multiple queue in JCN??
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Aug 31, 2010 10:22 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Which part, exactly, are you confused about?
  • How to configure an MQOutput node to use a queue name from the message tree, rather than from a node property
  • How to propagate a message to different output terminals of a JavaCompute node
  • How to populate different portions of the logical message tree using the Java API for Message Broker
  • how to connect different terminals to different MQOutput nodes
  • How many output terminals are available on a JavaCompute node

?

But if you want one link to answer all of those questions, it is this one.
Back to top
View user's profile Send private message
wisemind
PostPosted: Tue Aug 31, 2010 11:02 am    Post subject: Reply with quote

Apprentice

Joined: 16 Jun 2010
Posts: 29

Well this is what i want using Java Compute Node.

how to connect different terminals to different MQOutput nodes.
Back to top
View user's profile Send private message
wisemind
PostPosted: Tue Aug 31, 2010 11:07 am    Post subject: Reply with quote

Apprentice

Joined: 16 Jun 2010
Posts: 29

Lets suppose i have create these two messages.

MbMessage outMessage = new MbMessage(inMessage);
MbMessageAssembly outAssembly = new MbMessageAssembly(contact admin, outMessage);
...
newMsg.finalizeMessage(MbMessage.FINALIZE_NONE);
out.propagate(outAssembly);
...
newMsg.finalizeMessage(MbMessage.FINALIZE_NONE);
out.propagate(outAssembly);


Now my question is how to propogate messages at different MQNodes that is attached to this JCN????
Back to top
View user's profile Send private message
wisemind
PostPosted: Tue Aug 31, 2010 11:30 am    Post subject: Reply with quote

Apprentice

Joined: 16 Jun 2010
Posts: 29

I ALSO tried to find out this point that you told me before but unable to know how to do this in Java Compute Node...

How to configure an MQOutput node to use a queue name from the message tree, rather than from a node property


Thanks
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Aug 31, 2010 11:33 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

it seems you read most of this link, in that you appear to have copy/pasted code, but you do not seem to have read all of this page.
Back to top
View user's profile Send private message
wisemind
PostPosted: Tue Aug 31, 2010 11:37 am    Post subject: Reply with quote

Apprentice

Joined: 16 Jun 2010
Posts: 29

I read this page. The thing i want to send messages to different queue. I dont want to use alternative terminal. I want to use the output terminal. That points to 2 different MQNodes.

The thing i want to propagate message firstly to first MQNode. And next message to 2nd MQNode. So how to set values of the particular MQNode in JavaCompute Node.

I hope you got my point.

thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Can we put different msgs on diff. queues via Java Compute??
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.