This document is still not avaliable. Please come back in a few weeks.
Message processing is a problem that involves the creation, replication and filtering of data that flows across different logic paths. The creation and manipulation of such data can be very memory consuming if not done carefully. Think about a large Internet mailing list with 500 subscriptors and a batch job that has to send 10 messages to them. With a message of 100kb an application could be using 500Mb of memory to store the messages before sending them. Seems like this is not a good way of doing things.
'distribution' is oriented to dispatch messages one by one, thus consuming the smaller amount of memory resources that is possible. To do this, handlers are designed to return the messages as soon as they are processed, allowing each message to reach the end of the processing chain before handling other one.
The bad side of doing this is that some resources (POP3 connections, SMTP connections, database connections...) may timeup in the interval in which a message is processed by handlers. To handle this, components and handlers are designed to be able to reopen connections whenever possible. For situations when this is not possible, caching strategies are avaliable.
The central part of distribution is the DistributionProcess. It represents a distribution process which is, in gross, defined by a set of nodes and components.
A node holds a MessageHndler, which performs certain operations on the message that it receives. A node also stores a list of forwards. Each forward references another node that will be receiving the messages returned by the former node.
The set of nodes and their forwards conform a flow graph that messages go through during the distribution process. In each node, messages may be edited, created, blocked or replicated.
When the DistributionProcess is initialized, a DistributionMessage is dropped in the process' start node. This serves only for the purpose of signaling the first node that the process has begun. From that moment, the messages will go through the chain of nodes following the rules that have been configurated in the forwards.
Messages are routed by a piece called the MessageFlowController.
TODO: Explain the mechanics of the data plugins package vs message flow.
Plugins are the pieces of distribution where job is actually done. The plugins. Plugins provide the necessary components to process messages and data.
A plugin may provide different classes of objects: