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 » Route to label node property

Post new topic  Reply to topic
 Route to label node property « View previous topic :: View next topic » 
Author Message
yellowbee
PostPosted: Fri Aug 03, 2012 2:25 am    Post subject: Route to label node property Reply with quote

Acolyte

Joined: 14 Apr 2012
Posts: 58

Could anybody Please clear this one

What is the difference between Route to First and Route to last in the route to label node?

Where it will be useful and any example of practical scenario would be highly appreciated..

Thanks in Advance.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Aug 03, 2012 2:37 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

To quote the V7 InfoCentre
Quote:

This property determines the routing behavior of the node when an inbound message matches multiple filter expressions. If you set the Distribution Mode property to First, the message is propagated to the associated output terminal of the first expression in the table that resolves to true. If you set this property to All, the message is propagated to the associated output terminal for each expression in the table that resolves to true. If no output terminal matches, the message is propagated to the Default terminal.

seems fairly clear to me.

viz,

If you are using filters in the node then the Route to will happen at the First match.

I've never used this Node as I tend to like deciding where I want to go in a compute node before and then use a Route To Label. But there again, I'm a well known
_________________
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
McueMart
PostPosted: Fri Aug 03, 2012 2:50 am    Post subject: Reply with quote

Chevalier

Joined: 29 Nov 2011
Posts: 490
Location: UK...somewhere

I think smdavies99 slightly misread the OP's question. The OP was talking about the function of the 'Route to label' node, and smdavies has responded giving the functionality of the 'Route' node.



Regarding the 'Route to label' node, imagine you have a Destination List set up like:

Code:

SET OutputLocalEnvironment.Destination.RouterList.DestinationData[1].labelName = 'Label1';
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[2].labelName = 'Label2';
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[3].labelName = 'Label3';


With mode 'Route to First' set, the message will be propagated to 'Label1', with 'Route to Last' set, the message will be propagated to 'Label3'.

When to use each option depends totally on your requirements!
Back to top
View user's profile Send private message
yellowbee
PostPosted: Fri Aug 03, 2012 3:05 am    Post subject: Reply with quote

Acolyte

Joined: 14 Apr 2012
Posts: 58

Hi McueMart,
Thanks for your response

Please have a look at this

Quote:
Route to First:-Removes the first element from Local Environment. The current Message is routed to the Label node.That is identified by the List item.


Quote:
Route to Last:-Removes the Last element from Local Environment. The current Message is routed to the Label node.That is identified by the List item.


What my doubt is what actually is"first element " and "Last Element" referring to.
Back to top
View user's profile Send private message
McueMart
PostPosted: Fri Aug 03, 2012 3:17 am    Post subject: Reply with quote

Chevalier

Joined: 29 Nov 2011
Posts: 490
Location: UK...somewhere

Its referring to the entries in the local environment which you setup before the 'Route to label' node. Take this example.

Imagine we have a compute node which sets up:

Code:

SET OutputLocalEnvironment.Destination.RouterList.DestinationData[1].labelName = 'Label1';
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[2].labelName = 'Label2';
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[3].labelName = 'Label3';


Then you have a 'Route to label' with 'Route to First' selected.

After your label node, the Local Environment would now look like:

Code:

LocalEnvironment.Destination.RouterList.DestinationData[1].labelName = 'Label2';
LocalEnvironment.Destination.RouterList.DestinationData[2].labelName = 'Label3';


This is because the first element ('Label1') has been removed from the Local Environment.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Aug 03, 2012 4:28 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

yellowbee wrote:
What my doubt is what actually is"first element " and "Last Element" referring to.


The 'first element' is the one labelled "1". You see, that's the number 1 which indicates that there's one, and that it comes before two or three or etc.

The 'last' element is the element that is the furthest from number 1, such that there are no elements after it. You see? The element that comes 'last' in the list.
Back to top
View user's profile Send private message
yellowbee
PostPosted: Fri Aug 03, 2012 6:00 am    Post subject: Reply with quote

Acolyte

Joined: 14 Apr 2012
Posts: 58

Thanks McueMart..

got it
Back to top
View user's profile Send private message
ashokjagatha
PostPosted: Thu Jul 23, 2015 2:19 am    Post subject: Reply with quote

Novice

Joined: 23 Jul 2015
Posts: 13



As per the above mentioned example , if i have a list of 3 labels when will the second label triggers.
I used route to first and route to last both of them are processing either first or last ,then what about the middle label
[/code][/quote]
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jul 23, 2015 4:46 am    Post subject: Reply with quote

Grand High Poobah

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

ashokjagatha wrote:
As per the above mentioned example , if i have a list of 3 labels when will the second label triggers.
I used route to first and route to last both of them are processing either first or last ,then what about the middle label


What about it? You have deliberately set the property to be "Route To First" indicating you want the message routed to the first label in the list, or you have set "Route to Last" indicating that you want the message routed to the last label in the list. If in the example you reference above, you want to route to "Label2" then you'd need to change it's position in the list.

As I think this thread very clearly lays out.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
ashokjagatha
PostPosted: Fri Jul 24, 2015 5:23 am    Post subject: Reply with quote

Novice

Joined: 23 Jul 2015
Posts: 13

Quote:
Vitor

My list size should be only 2 on that case what if I want to route to whole list.

Please guide me i m confused
_________________
AJ MB developer
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jul 24, 2015 5:40 am    Post subject: Reply with quote

Grand High Poobah

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

ashokjagatha wrote:
My list size should be only 2 on that case what if I want to route to whole list.


Then you need to do that.

ashokjagatha wrote:
Please guide me i m confused


The Route node has 2 modes - Route to First and Route To Last. If you want to route to multiple destinations, you either need to follow the advice in this thread or use a Compute node.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jul 24, 2015 6:20 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

What does it mean "route to both"? In parallel? In some sequence? With a single message? With duplicate messages?

Route To Label removes the label it routes to from the list.
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 » Route to label node property
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.