Universal Messaging 10.7 | Concepts | Messaging Paradigms | Publish / Subscribe (using Data Groups and Data Streams) | Overview of Data Groups and Data Streams
 
Overview of Data Groups and Data Streams
Universal Messaging data groups provide an alternative to channels (JMS topics) for the publish/subscribe messaging paradigm.
Universal Messaging data groups provide a very lightweight grouping structure that allows you to manage user subscriptions remotely and transparently. The process of managing subscribers can be carried out by publishers themselves or by some other process.
There are two resources that are used when interacting with data groups: data streams and data groups.
Data Streams
A data stream is a destination for published events. Publishers with appropriate permissions can write events directly to data streams. A Universal Messaging client session can optionally have a data stream, and receive events through it.
A data stream can be a member of one or more data groups.
A Universal Messaging client (typically, but not necessarily, a simple consumer) may initialize a data stream-enabled session, making it eligible for membership in one or more data groups. Such a client is considered a data stream.
Data Groups
A data group is essentially a group of consumers to which publishers can send events; more specifically, data group members are either individual consumers or other (nested) data groups. A consumer which is a member of a data group is known as a data stream.
Any event written to a data group will be propagated to all data streams that are members of that data group.
Data groups may also contain other data groups. Any event written to an upper level data group will be written to all contained data groups, and thus to all contained data streams.
Note that all data streams are automatically added to the realm server's Default data group. Writing an event to the Default data group, therefore, will ensure it is delivered to any client with a session configured to use a data stream.
Each data group is a resource that exists within the Universal Messaging realm server, or within a cluster of multiple realm servers. Creating a data group creates the physical object within the realm. Once created, references to the data group can be obtained using the Universal Messaging Client and Admin APIs. Data groups can also be monitored and managed using the Enterprise Manager.
Messages published to a data group will be sent to all members of the group. There can be multiple publishers associated with a single data group, and data group membership can be managed by any Universal Messaging client that has permissions to do so.
Data groups are designed to support large numbers of consumers whose subscriptions are typically fluid in nature. The addition or removal of consumers from data groups can be entirely transparent from the consumer perspective.
Note:
It is typical (though not necessary) for a process which publishes data to data groups to be independent of the process that manages data group structures and data group membership of end-user data streams. This allows the logic for these two very different responsibilities to be separated. Thus, data streams do not determine the data groups of which they are members; their membership is determined by clients with the appropriate permissions.
For information about setting up and using data groups and streams programmatically, see the Universal Messaging developer guide for your chosen programming language (Developer Guide for Java, etc.). Alternatively, refer to the Enterprise Manager for information on working with data groups and streams via a graphical user interface.
Using in a Multicast environment
Data groups and data streams can be used in a multicast environment. Refer to the section Multicast: An Overview for related information.