A method of automatically subscribing a network device to a plurality of
events applicable to a logical group, of which the network device is a
member, is disclosed. The method involves first creating and storing a
mapping that associates a plurality of network devices with a logical
group and that associates the logical group with one or more events that
can pass over an event bus to which the network device is logically
coupled. At runtime, a device identifier of one of the network devices in
the logical group is received, an event identifier of an event that is
among the one or more events that are in the second mapping is received.
Based on the mapping, the method causes the network device to receive all
events that are associated in the mapping with the logical group that
includes the network device. As a result, a network device receives all
events that pertain to it without having to store a list of the logical
groups in which it participates and without having to know what events
pertain to it or the groups.