Skip to main content

Problem:

  • Product Name: VisiBroker
  • Product Version: 7 and above
  • Product Component: VisiNotify
  • OS/Platform Versions: all supported versions
  • JDK/Compiler Versions: all supported versions

What is "logical channel" in VisiNotify? (which is mentioned in VisiNotify Guide)

Resolution:

VisiNotify has a filtering strategy which does not rely on the Interface Repository. This approach is to divide a given typed channel into multiple logical channels for event delivery.

The virtual channel created with proxy key ("channel-1" and "channel-2") is called logical channel.It performs like a filter but does not rely on Interface Repository. Instead, the user has to use a proxy key to specify a channel name. This approach is more efficient and flexible than the constraint language parsing-based filtering.

For example, when using typed push model, the first push consumer starts with proxy key "channel-1" and the second push consumer starts with proxy key "channel-2". If a push supplier starts with proxy key "channel-1", all the events will be sent to the first push consumer (i.e. with proxy "channel-1"). On the other hand, if the push supplier starts with proxy key "channel-2", all events will hence be sent to second push consumer (with proxy key "channel-2").

A simple example is included for clarification. This example is based on typed push model from $(VBROKERDIR)/examples/vbroker/notify/basic_cpp (you can download/copy to the directory and build the test there)

To run the example, 

  1. start logical channel1 with 
    typedPushConsumer -ORBDefaultInitRef corbaloc:::14100 -proxy-key channel-1
  2. Start logical channel 2 with
    typedPushConsumer -ORBDefaultInitRef corbaloc:::14100 -proxy-key channel-2
  3. (create more channels ...)
  4. Start pushing event to channel 1:
    typedPushSupplier -ORBDefaultInitRef corbaloc:::14100 -proxy-key channel-1

Note: Make sure the directory visinotify.dir is cleaned before running the test.

It shows that only "channel-1" consumer receives the events. By checking visinotify.dir/default_channel/default_consumer_admin directory, it can be seen that 2 sub folders have been created -- which keep the configuration of these 2 logical channels.

Author: Guo Yijing

Old KB# 29415

#VisiBroker
#Security
#notificationservice