Skip to content

Commit 60b854f

Browse files
committed
formatting
Signed-off-by: Gabriele Santomaggio <[email protected]>
1 parent dad91eb commit 60b854f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

examples/streams/example_with_streams.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,7 @@ def main() -> None:
104104
message_handler=MyMessageHandler(),
105105
# can be first, last, next or an offset long
106106
# you can also specify stream filters with methods: apply_filters and filter_match_unfiltered
107-
stream_consumer_options=StreamConsumerOptions(
108-
offset_specification=OffsetSpecification.first
109-
),
107+
stream_consumer_options=StreamConsumerOptions(offset_specification=OffsetSpecification.first),
110108
)
111109
print(
112110
"create a consumer and consume the test message - press control + c to terminate to consume"

rabbitmq_amqp_python_client/entities.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,10 @@ class ExchangeToExchangeBindingSpecification:
148148
destination_exchange: str
149149
binding_key: Optional[str] = None
150150

151-
151+
"""
152+
StreamFilterOptions defines the filtering options for a stream consumer.
153+
for values and match_unfiltered see: https://www.rabbitmq.com/blog/2023/10/16/stream-filtering
154+
"""
152155
class StreamFilterOptions:
153156
values: Optional[list[str]] = None
154157
match_unfiltered: bool = False
@@ -180,7 +183,7 @@ class StreamConsumerOptions:
180183
Args:
181184
offset_specification: Either an OffsetSpecification enum value or
182185
an integer offset
183-
filters: List of filter strings to apply to the stream
186+
filter_options: Filter options for the stream consumer. See StreamFilterOptions
184187
"""
185188

186189
def __init__(

0 commit comments

Comments
 (0)