File tree Expand file tree Collapse file tree 5 files changed +11
-7
lines changed
StreamFilter/StreamFilter Expand file tree Collapse file tree 5 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ internal static class Consts
20
20
internal const string SubscriptionPropertyFilterPrefix = "filter." ;
21
21
internal const string SubscriptionPropertyMatchUnfiltered = "match-unfiltered" ;
22
22
23
+ internal const string FilterNotSupported = "Broker does not support filtering. " +
24
+ "You need RabbitMQ 3.13.0 or later and" +
25
+ "the stream_filtering feature flag enabled." ;
26
+
23
27
internal static int RandomShort ( )
24
28
{
25
29
return Random . Shared . Next ( 500 , 1500 ) ;
Original file line number Diff line number Diff line change @@ -82,9 +82,7 @@ internal void Validate()
82
82
83
83
if ( IsFiltering && ! AvailableFeaturesSingleton . Instance . PublishFilter )
84
84
{
85
- throw new UnsupportedOperationException ( "Broker does not support filtering. You need " +
86
- "RabbitMQ 3.13.0 or later and " +
87
- "the stream_filtering feature flag enabled." ) ;
85
+ throw new UnsupportedOperationException ( Consts . FilterNotSupported ) ;
88
86
}
89
87
90
88
switch ( ConsumerFilter )
Original file line number Diff line number Diff line change @@ -44,9 +44,7 @@ internal void Validate()
44
44
{
45
45
if ( Filter is { FilterValue : not null } && ! AvailableFeaturesSingleton . Instance . PublishFilter )
46
46
{
47
- throw new UnsupportedOperationException ( "Broker does not support filtering. " +
48
- "You need RabbitMQ 3.13.0 or later and" +
49
- "the stream_filtering feature flag enabled." ) ;
47
+ throw new UnsupportedOperationException ( Consts . FilterNotSupported ) ;
50
48
}
51
49
}
52
50
}
Original file line number Diff line number Diff line change 1
1
Server Side Filter Example
2
2
--------------------------
3
3
4
+ WARNING: Filtering requires * RabbitMQ 3.13* or more and the stream_filter feature flag enabled.
5
+
6
+
4
7
This example shows how to use the server side filter to filter the data on the server side.
5
8
9
+
6
10
### Running the Producer
7
11
8
12
```
Original file line number Diff line number Diff line change 4
4
5
5
==== Filtering
6
6
7
- WARNING: Filtering requires *RabbitMQ 3.13* or more.
7
+ WARNING: Filtering requires *RabbitMQ 3.13* or more and the stream_filter feature flag enabled .
8
8
9
9
RabbitMQ Stream provides a server-side filtering feature that avoids reading all the messages of a stream and filtering only on the client side.
10
10
This helps to save network bandwidth when a consuming application needs only a subset of messages, e.g. the messages from a given geographical region.
You can’t perform that action at this time.
0 commit comments