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 » Message Routing

Post new topic  Reply to topic Goto page 1, 2  Next
 Message Routing « View previous topic :: View next topic » 
Author Message
kiestrada
PostPosted: Wed Jul 17, 2002 7:17 pm    Post subject: Message Routing Reply with quote

Novice

Joined: 19 Jun 2002
Posts: 12

I have the following situation:

If field1 = A then send to queue A
If filed1 = B then send to queue B

I plan to use MQInput node ==> Compute node ==> MQOutput node.

I am still new to WMQI, Could anyone provide detail information?

Thanks.
Back to top
View user's profile Send private message
kirani
PostPosted: Wed Jul 17, 2002 7:24 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Sure ... Depending on your condition, you could setup queuename in DestinationList in your compute node. Don't forget to pass DestinationList also in your Compute mode.
In MQOutput node, under Advanced tab, you should select DestinationList instead of queueName.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
kiestrada
PostPosted: Wed Jul 17, 2002 7:34 pm    Post subject: Reply with quote

Novice

Joined: 19 Jun 2002
Posts: 12

Thanks for your immediate reply.

Could you please further enlighten me on the ESQL in compute node.
Back to top
View user's profile Send private message
kirani
PostPosted: Wed Jul 17, 2002 7:41 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

In your compute node, ESQL code will look similar to this:

Code:

If ( field1 = 'A' ) THEN
  SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].queueName = 'queueA';
ELSE IF ( field1 = 'B') THEN
    SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].queueName = 'queueB';
  END IF;
END IF;


Above ESQL will work in WMQI 2.1. If you are using lower version of MQSI then above code needs to be changed to use DestinationList instead. DestinationList has little different structure.

Let me know how it goes.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
kiestrada
PostPosted: Fri Jul 19, 2002 6:09 pm    Post subject: Reply with quote

Novice

Joined: 19 Jun 2002
Posts: 12

Hi Kiran,

I am using 2.0.1. I have replaced the destinationData with detinationList. It can't be deployed. The error message is 'OutputLocalEnvironment' is not valid.

Subsequently I changed OutputLocalEnvironment to OutputRoot, all messages went to failure queue.

Thanks
Back to top
View user's profile Send private message
kirani
PostPosted: Fri Jul 19, 2002 9:42 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Hi,

In lower version of MQSI you will have to use following code instead:
Code:

If ( field1 = 'A' ) THEN
  SET OutputDestinationList.Destination.MQDestinationList.DestinationData[1].queueName = 'queueA';
ELSE IF ( field1 = 'B') THEN
  SET OutputDestinationList.Destination.MQDestinationList.DestinationData[1].queueName = 'queueB';
  END IF;
END IF;

_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
kiestrada
PostPosted: Mon Jul 22, 2002 4:11 pm    Post subject: Reply with quote

Novice

Joined: 19 Jun 2002
Posts: 12

Thanks Kiran. I tried a simple scenario as follow:-

field1 (string 1)
field2 (string 3)

Well the message end up in the failure queue. Below is the trace:

1) for Input message = A123

BIP2619E: Output node 'queue B' expected a distribution list but one did not exist.

2) If my input message is B123, then the error is BIP2619E: Output node 'queue A' expected a distribution list but did not exist.

I have the output node configure as follows:
Basic tab: Queue A
Advanced tab: Destination List

Thanks for your help.
Back to top
View user's profile Send private message
kirani
PostPosted: Mon Jul 22, 2002 4:36 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

What about your Compute node?? What do you have in Compute mode, under Advanced Tab? Depending on your processing, you should have "DestinationList" as a part of Compute mode.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
kiestrada
PostPosted: Mon Jul 22, 2002 6:05 pm    Post subject: Reply with quote

Novice

Joined: 19 Jun 2002
Posts: 12

Compute Node: Destination (Advanced Tab)

The options in the Advanced Tab are:
Message, Destination, Destination and message, Exception, Exception and Messagve, Exceptiona and Destination, All
Back to top
View user's profile Send private message
kirani
PostPosted: Mon Jul 22, 2002 6:29 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

If you are modifying your message in the compute node then you should set the destination mode to "Message and DestinationList".
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
kiestrada
PostPosted: Mon Jul 22, 2002 6:36 pm    Post subject: Reply with quote

Novice

Joined: 19 Jun 2002
Posts: 12

I have changed to Message and Destination.

Well the message now stays at input queue. Is there anything that I should check? typo??

Thanks
Back to top
View user's profile Send private message
kirani
PostPosted: Mon Jul 22, 2002 6:41 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Can you post your ESQL code here? Also pl explain your Message flow here.

MQInput(xml)->Compute1->MQOutput.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
kiestrada
PostPosted: Mon Jul 22, 2002 7:01 pm    Post subject: Reply with quote

Novice

Joined: 19 Jun 2002
Posts: 12

Input Node --> Compute Node --> Output Node

Input Node => MRM, message set, message type, message format=CWF
Field1 (String 1)
Filed2 (String 2)
Failure => Output Node (Failure)
Out => Compute Node

Compute Node => Destination and Message (Advanced tab)
If ('Field1' = 'A') THEN
SET OutputDestinationList.Destination.MQDestinationList.DestinationData[1].queueName = 'QueueA';
ELSE IF ('Field1' = 'B') THEN
SET OutputDestinationList.Destination.MQDestinationList.DestinationData[1].queueName = 'QueueB';
END IF;
END IF;

Output Node:
Queue Name: QueueA
Advanced: Destination List

Output Node:
Queue Name: QueueB
Advanced: Destination List

Thanks.
Back to top
View user's profile Send private message
kirani
PostPosted: Mon Jul 22, 2002 7:10 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Compute node:
If you don't select "Copy Message Headers" or "Copy entire Message". Your Compute mode should be set to "Destination" only.
If you select Copy entire message then set destination Mode to "Message and DestinationList".

Your ESQL remains same in the compute node.

There should be only one MQOutput node.
Queue Name: should be set to nothing.
Advanced: DestinationList.

Have a trace node in between Compute node and MQOutput node and print the trace to file. Print ${DestinationList} in it and see if the list is getting set properly.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
kiestrada
PostPosted: Wed Jul 24, 2002 6:38 pm    Post subject: Reply with quote

Novice

Joined: 19 Jun 2002
Posts: 12

Hi Kiran,

Below was my latest trial:

Compute node:
Didn't select "Copy Message Headers" or "Copy entire Message". And the Compute mode set to "Destination".

ESQL remained same in the compute node.

one MQOutput node.
Queue Name: set to nothing.
Advanced: Destination.

[Case 1]Add a trace node in between Compute node and MQOutput node and print the trace to file. Print ${DestinationList}
Outcome --> message sent to failure queue(@ input node, i.e. before compute node). Nothing appeared in the trace node

[Case 2]Add additional trace node in between input node and Compute node and print the trace to file. Print ${DestinationList}. Also tried Print${ExceptionList}
Outcome --> message sent to failure queue(@ input node, i.e. before compute node). Nothing appeared in the trace node.

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 » Message Routing
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.