Buffered Queues
Another group of events that use the queue
tables includes the apply error transactions. When the Apply
process fails to apply transactions, they are immediately moved
into the error queue and are stored into the associated queue
table. This keeps the buffers free for the current events that
are being processed. This makes sense in terms of efficiency as
the DBA may chose to attend to the error transactions at later
time while keeping the Apply process moving forward.
What is SYS.AnyData?
Events of different data types can be
staged into a SYS.AnyData queue. The SYS.AnyData type is
defined at the database level. Almost any type of payload can be
wrapped in a SYS.AnyData queue. To do this, the
convertdata_type static functions of the SYS.AnyData type
can be used. In this case, data type is the type of object to
wrap. These functions take the object as input and return a
SYS.AnyData object. Since the database table columns routinely
have different data types in their definition, the Streams
processes deal the columns a uniform data type during the data
flow. At the end of Streams flow, they are converted back to the
original data type. The transmission of a single, uniform data
type facilitates the smooth, consistent, and efficient exchange
of data.
Users and applications may enqueue events
into a SYS.AnyData queue or into a typed queue. Remember, a
typed queue can stage events of one specific data type only.