Creates the named stream and its tables, or applies the supplied settings to
an existing stream. On an empty installation, it first registers the system
with defaults. An existing system keeps its configuration.
Example
Register the payments.requested stream using an initialized client and
the example payload.
Every call applies the declaration after defaults. Omitted mutable fields
therefore return to their defaults. Different applications declaring different
settings for the same stream overwrite each other’s settings. A stored stream
setting change emits SQL0061.
Registration preserves the stream id, messages, consumer groups, and maintenance
suspension and instance targets. Maintenance configuration changes apply to
newly claimed instances. Mutating cfg after Register returns does not update
the stored declaration.
Errors
Error
When
Validation error
The name does not match ^[a-z0-9._-]+$, or a configuration field is invalid.
ErrReservedStreamName
The name starts with __system..
ErrStreamConfigMismatch
An existing stream has a different PartitionSize.
Schema compatibility error
The system or stream schema is incompatible with this library build.
ErrStreamDeclarationInterrupted
The stream declaration disappears during registration.