|
Joining a channel
to another allows you to set up content routing such
that events on the source channel will be passed on
to the destination channel also. Joins also support
the use of filters thus enabling dynamic content routing.
Channels can be joined
programatically or by using the Nirvana Realm Manager
GUI.
A script to provide channel joins called nmakechanjoin
join script is also provided in the client bin directory
of the Nirvana installation. For further information
on using this script please see the Nirvana
programming guide or simply run the script without
any paramaters. For further example code demonstrating
channel joins please see the Nirvana joins
example.
In order to join channels from different Realms using
the Realm Manager GUI it is necessary to first of all
add both Realms into a single namespace. For instructions
on this please see the adding
realms FAQ.
Once you have added two or more Realms to a single
namespace the following two steps can be uesd to create
channel joins. In these examples 1 Realm has been added
to another Realms namespace under the mountpoint /bkup
as illustrated below:
In the example provided below the channel FooChannel
on the nirvanaPrimary Realm will be joined to the channel
ChannelFoo which resides on a Realm which is mounted
under /bkup.
Step 1: Choose the Join Channel dialog
by right clicking on the source channel.

Step 2: In the join dialog box specify
the name of the channel to join. Also specify any filter
that you wish to be applied to the join. In this case
the filter states that only events with a key called
DESTINATION witha value of 'bkup' will be moved to the
destination channel ( /bkup/ChannelFoo). If you would
like to limit the number of Hops that an event can make
then specify a hop count. If none is specified then
the event will be passed on via any subsequent joins
which may be in place at the destination channel.

Once the joins have been added if you click on the
joins tabl for FooChannel you will see that there is
one outgoing join which has a filter applied. This means
that any event published to the channel will be passed
on to the specified channel providing the the filter
criteria is met.

If you click on the destination channel (ChannelFoo)
you will see that it has an incomming join.

|