Local channels are used in rules or rule functions to route events to an appropriate agent running in the same engine (processing unit). Local channels are useful in two cases:
See Adding Channels and Destinations for details on adding local channels.
Local channels pass the same event object between the agents. Consuming the event in one agent does not affect other agents that also received the event over a local channel. A use count is maintained for each event to track how many agents have received the event but not consumed it. The use count of the event is incremented depending on the number of agents it is routed to. When an event is consumed in one agent, TIBCO BusinessEvents deletes the reference to the event in that agent and it decrements the use count of the original event instance.
To route an event to a local channel, use the Event.routeTo() function. (You can use this function for other purposes too.)
In the provided example, BE_HOME/Examples/MultipleSessionsAndLocalChannel, events containing small orders are sent to the agent that deals with small orders as follows: