The Producer
and Consumer Model
For instance, in a source database the
table ‘orders’ is updated by application transactions. This
action generates redo entries into the redo logs. The changes
are produced at the source database and this database becomes
the producer. These transactional changes are then routed to a
destination database where the Streams client, via the Apply
process, consumes them to update the orders table. The
destination database becomes the consumer. There could be even
multiple consumers especially when the changes are routed to
multiple destinations.
Thus, the consumer is typically the
destination database in which database changes or user messages
that have been system generated by the producer are ultimately
consumed. Once changes are generated at a source database, they
may be consumed by more than one remote database. In addition,
any application can consume messages. This model of “producer
and consumer” controls the nature of the data flow origin and
ultimate usage.
Streams
Clients and Event Flow
In the Streams environment, there are four
distinct entities which act as the clients. They are called
Streams Clients. These distinct entities are: the Capture
process, the Apply process, the Propagation process and the
Messaging client which is typically a user application. All
operations are conducted by these four entities, and they act as
the producers and consumers. Any activity for data flow within
Streams is controlled and managed by these four Streams Client
processes. They are typically the Oracle processes which perform
the data flow.