Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Working with Local Channels

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:

- For applications using In Memory object management (generally used only for testing)
- For certain scenarios where an inference agent is co-deployed with a query agent. See TIBCO BusinessEvents Event Stream Processing Query Developer Guide.

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 that 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.

Local channel destinations can use an event preprocessor and have no default events. To route an event to a local channel’s destination, 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:

    Event.routeTo(order, "/Channels/Local/toSmall", "");

The signature of this function is as follows:

    SimpleEvent routeTo(SimpleEvent event, String destinationPath, String properties)

In TIBCO BusinessEvents, you can add the following channels:

- Local
- HTTP
- JMS
- Kafka
- Legacy ActiveSpaces
- FTL
- ActiveSpaces
- Hawk

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.