Skip to content

Commit cae38aa

Browse files
committed
Clarify the argument vs policy behavior for streams
1 parent 3d16360 commit cae38aa

File tree

3 files changed

+30
-63
lines changed

3 files changed

+30
-63
lines changed

docs/streams.md

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -139,24 +139,20 @@ Sets the maximum age of the stream. See [retention](#retention). Default: not se
139139

140140
* `x-stream-max-segment-size-bytes`
141141

142-
Unit: bytes.
143-
144142
A stream is divided up into fixed size segment files on disk.
145-
This setting controls the size of these.
146-
Default: (500000000 bytes).
143+
This setting controls the size in bytes of these.
144+
Default: 500000000 bytes.
145+
146+
* `x-stream-filter-size-bytes`
147147

148-
While this argument can be configured via a policy, it will _only_ be applied
149-
to the stream if the policy is set (exists) at stream declaration time. If this argument
150-
is changed for a matching but pre-existing stream it **will not be changed** even
151-
if the effective policy of the queue record may indicate it is.
148+
The size in bytes of the Bloom filter used for [filtering](#filtering).
149+
The value must be between 16 and 255.
150+
Default: 16 bytes.
152151

153-
Hence it is best to only configure this via an option queue argument,
154-
`x-stream-filter-size-bytes`.
152+
While the `x-stream-max-segment-size-bytes` and `x-stream-filter-size-bytes` arguments can be configured via a policy, they will _only_ be applied to the stream if the policy is set (exists) at stream declaration time.
153+
If these arguments are changed for a matching but pre-existing stream they **will not be changed** even if the effective policy of the queue record may indicate it is.
155154

156-
:::note
157-
While `x-stream-filter-size-bytes` can be configured via a policy, it will _only_ be applied
158-
to the stream if the policy exists at stream declaration time
159-
:::
155+
Hence it is best to only configure these via queue arguments.
160156

161157
The following example in Java demonstrates how the argument can be set
162158
at stream declaration time in application code:
@@ -179,13 +175,6 @@ channel.queueDeclare(
179175
);
180176
```
181177

182-
The value is set in bytes.
183-
184-
The size of the Bloom filter used for [filtering](#filtering).
185-
The value must be between 16 and 255.
186-
Default: 16.
187-
188-
189178
### Client Operations
190179

191180
#### Consuming {#consuming}

versioned_docs/version-3.13/streams.md

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -139,24 +139,20 @@ Sets the maximum age of the stream. See [retention](#retention). Default: not se
139139

140140
* `x-stream-max-segment-size-bytes`
141141

142-
Unit: bytes.
143-
144142
A stream is divided up into fixed size segment files on disk.
145-
This setting controls the size of these.
146-
Default: (500000000 bytes).
143+
This setting controls the size in bytes of these.
144+
Default: 500000000 bytes.
145+
146+
* `x-stream-filter-size-bytes`
147147

148-
While this argument can be configured via a policy, it will _only_ be applied
149-
to the stream if the policy is set (exists) at stream declaration time. If this argument
150-
is changed for a matching but pre-existing stream it **will not be changed** even
151-
if the effective policy of the queue record may indicate it is.
148+
The size in bytes of the Bloom filter used for [filtering](#filtering).
149+
The value must be between 16 and 255.
150+
Default: 16 bytes.
152151

153-
Hence it is best to only configure this via an option queue argument,
154-
`x-stream-filter-size-bytes`.
152+
While the `x-stream-max-segment-size-bytes` and `x-stream-filter-size-bytes` arguments can be configured via a policy, they will _only_ be applied to the stream if the policy is set (exists) at stream declaration time.
153+
If these arguments are changed for a matching but pre-existing stream they **will not be changed** even if the effective policy of the queue record may indicate it is.
155154

156-
:::note
157-
While `x-stream-filter-size-bytes` can be configured via a policy, it will _only_ be applied
158-
to the stream if the policy exists at stream declaration time
159-
:::
155+
Hence it is best to only configure these via queue arguments.
160156

161157
The following example in Java demonstrates how the argument can be set
162158
at stream declaration time in application code:
@@ -174,13 +170,6 @@ channel.queueDeclare(
174170
);
175171
```
176172

177-
The value is set in bytes.
178-
179-
The size of the Bloom filter used for [filtering](#filtering).
180-
The value must be between 16 and 255.
181-
Default: 16.
182-
183-
184173
### Client Operations
185174

186175
#### Consuming {#consuming}

versioned_docs/version-4.0/streams.md

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -139,24 +139,20 @@ Sets the maximum age of the stream. See [retention](#retention). Default: not se
139139

140140
* `x-stream-max-segment-size-bytes`
141141

142-
Unit: bytes.
143-
144142
A stream is divided up into fixed size segment files on disk.
145-
This setting controls the size of these.
146-
Default: (500000000 bytes).
143+
This setting controls the size in bytes of these.
144+
Default: 500000000 bytes.
145+
146+
* `x-stream-filter-size-bytes`
147147

148-
While this argument can be configured via a policy, it will _only_ be applied
149-
to the stream if the policy is set (exists) at stream declaration time. If this argument
150-
is changed for a matching but pre-existing stream it **will not be changed** even
151-
if the effective policy of the queue record may indicate it is.
148+
The size in bytes of the Bloom filter used for [filtering](#filtering).
149+
The value must be between 16 and 255.
150+
Default: 16 bytes.
152151

153-
Hence it is best to only configure this via an option queue argument,
154-
`x-stream-filter-size-bytes`.
152+
While the `x-stream-max-segment-size-bytes` and `x-stream-filter-size-bytes` arguments can be configured via a policy, they will _only_ be applied to the stream if the policy is set (exists) at stream declaration time.
153+
If these arguments are changed for a matching but pre-existing stream they **will not be changed** even if the effective policy of the queue record may indicate it is.
155154

156-
:::note
157-
While `x-stream-filter-size-bytes` can be configured via a policy, it will _only_ be applied
158-
to the stream if the policy exists at stream declaration time
159-
:::
155+
Hence it is best to only configure these via queue arguments.
160156

161157
The following example in Java demonstrates how the argument can be set
162158
at stream declaration time in application code:
@@ -179,13 +175,6 @@ channel.queueDeclare(
179175
);
180176
```
181177

182-
The value is set in bytes.
183-
184-
The size of the Bloom filter used for [filtering](#filtering).
185-
The value must be between 16 and 255.
186-
Default: 16.
187-
188-
189178
### Client Operations
190179

191180
#### Consuming {#consuming}

0 commit comments

Comments
 (0)