Depending on whether the transmitter’s default_subjects is set to NONE or ALL, one of the following two use cases becomes impractical in terms of stream creation and configuration:
- Receiving events for all subjects
- Receiving events only for specific subjects
If default_subjects is NONE, it is impractical to call the add_subject_endpoint once for every subject in order to receive events for all subjects.
Conversely, if default_subjects is ALL, it is impractical to call the remove_subject_endpoint once for every other subject in order to receive events only for specific subjects.
I believe this issue can be resolved if there is a way to configure default_subjects on a per-stream basis when creating a stream. For example, this could be achieved by adding a default_subjects property to the Stream Configuration (i.e., allowing each stream to have its own default_subjects setting).
If one wants to receive events for all subjects, this can be achieved by creating a stream with default_subjects=ALL. On the other hand, if one wants to receive events only for specific subjects, this can be achieved by creating a stream with default_subjects=NONE and then calling the add_subject_endpoint.
As a concrete proposal, I'd like to suggest adding a default_subjects property to the Stream Configuration as described below. What do you think?
default_subjects
Receiver-Supplied, OPTIONAL. The value MUST be either "ALL" or "NONE". If omitted when creating the stream, the transmitter's default_subjects configuration is inherited. "ALL" indicates that events for all subjects are delivered to the stream, and the Receiver must call the remove_subject_endpoint to stop receiving events for specific subjects. Conversely, "NONE" indicates that events are not delivered to the stream by default (except in special cases such as verification events), and the Receiver must call the add_subject_endpoint to receive events for specific subjects.
Depending on whether the transmitter’s
default_subjectsis set to NONE or ALL, one of the following two use cases becomes impractical in terms of stream creation and configuration:If
default_subjectsis NONE, it is impractical to call theadd_subject_endpointonce for every subject in order to receive events for all subjects.Conversely, if
default_subjectsis ALL, it is impractical to call theremove_subject_endpointonce for every other subject in order to receive events only for specific subjects.I believe this issue can be resolved if there is a way to configure
default_subjectson a per-stream basis when creating a stream. For example, this could be achieved by adding adefault_subjectsproperty to the Stream Configuration (i.e., allowing each stream to have its owndefault_subjectssetting).If one wants to receive events for all subjects, this can be achieved by creating a stream with
default_subjects=ALL. On the other hand, if one wants to receive events only for specific subjects, this can be achieved by creating a stream withdefault_subjects=NONEand then calling theadd_subject_endpoint.As a concrete proposal, I'd like to suggest adding a
default_subjectsproperty to the Stream Configuration as described below. What do you think?