rabbitmq-amqp-python-client 0.4.0__tar.gz → 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rabbitmq-amqp-python-client might be problematic. Click here for more details.
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/PKG-INFO +1 -1
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/pyproject.toml +1 -1
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/entities.py +19 -4
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/_data.py +1 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/LICENSE +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/README.md +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/__init__.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/address_helper.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/amqp_consumer_handler.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/asyncio/__init__.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/asyncio/connection.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/asyncio/consumer.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/asyncio/environment.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/asyncio/management.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/asyncio/publisher.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/common.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/connection.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/consumer.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/delivery_context.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/environment.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/exceptions.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/management.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/options.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/publisher.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/py.typed +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/__init__.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/_common.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/_condition.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/_delivery.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/_endpoints.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/_events.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/_exceptions.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/_handler.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/_handlers.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/_io.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/_message.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/_reactor.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/_selectable.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/_tracing.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/_transport.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/_url.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/_utils.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/_wrapper.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/handlers.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/py.typed +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/reactor.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/tracing.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/qpid/proton/utils.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/queues.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/ssl_configuration.py +0 -0
- {rabbitmq_amqp_python_client-0.4.0 → rabbitmq_amqp_python_client-0.4.1}/rabbitmq_amqp_python_client/utils.py +0 -0
|
@@ -5,7 +5,7 @@ from typing import Any, Dict, Optional, Union
|
|
|
5
5
|
|
|
6
6
|
from .common import ExchangeType, QueueType
|
|
7
7
|
from .exceptions import ValidationCodeException
|
|
8
|
-
from .qpid.proton._data import Described, symbol
|
|
8
|
+
from .qpid.proton._data import Described, symbol, timestamp
|
|
9
9
|
|
|
10
10
|
SQL_FILTER = "sql-filter"
|
|
11
11
|
AMQP_SQL_FILTER = "amqp:sql-filter"
|
|
@@ -109,11 +109,13 @@ class OffsetSpecification(Enum):
|
|
|
109
109
|
first: Start from the first message in the stream
|
|
110
110
|
next: Start from the next message to arrive
|
|
111
111
|
last: Start from the last message in the stream
|
|
112
|
+
timestamp: Start from a specific timestamp
|
|
112
113
|
"""
|
|
113
114
|
|
|
114
115
|
first = ("first",)
|
|
115
116
|
next = ("next",)
|
|
116
117
|
last = ("last",)
|
|
118
|
+
timestamp = ("timestamp",)
|
|
117
119
|
|
|
118
120
|
|
|
119
121
|
@dataclass
|
|
@@ -243,7 +245,9 @@ class StreamConsumerOptions(ConsumerOptions):
|
|
|
243
245
|
|
|
244
246
|
def __init__(
|
|
245
247
|
self,
|
|
246
|
-
offset_specification: Optional[
|
|
248
|
+
offset_specification: Optional[
|
|
249
|
+
Union[OffsetSpecification, int, datetime]
|
|
250
|
+
] = None,
|
|
247
251
|
filter_options: Optional[StreamFilterOptions] = None,
|
|
248
252
|
):
|
|
249
253
|
|
|
@@ -275,7 +279,9 @@ class StreamConsumerOptions(ConsumerOptions):
|
|
|
275
279
|
if filter_options.sql is not None and filter_options.sql != "":
|
|
276
280
|
self._filter_sql(filter_options.sql)
|
|
277
281
|
|
|
278
|
-
def _offset(
|
|
282
|
+
def _offset(
|
|
283
|
+
self, offset_specification: Union[OffsetSpecification, int, datetime]
|
|
284
|
+
) -> None:
|
|
279
285
|
"""
|
|
280
286
|
Set the offset specification for the stream.
|
|
281
287
|
|
|
@@ -287,11 +293,20 @@ class StreamConsumerOptions(ConsumerOptions):
|
|
|
287
293
|
self._filter_set[symbol(STREAM_OFFSET_SPEC)] = Described(
|
|
288
294
|
symbol(STREAM_OFFSET_SPEC), offset_specification
|
|
289
295
|
)
|
|
290
|
-
|
|
296
|
+
if isinstance(offset_specification, OffsetSpecification):
|
|
291
297
|
self._filter_set[symbol(STREAM_OFFSET_SPEC)] = Described(
|
|
292
298
|
symbol(STREAM_OFFSET_SPEC), offset_specification.name
|
|
293
299
|
)
|
|
294
300
|
|
|
301
|
+
if isinstance(offset_specification, datetime):
|
|
302
|
+
# convert datetime to milliseconds since epoch
|
|
303
|
+
milliseconds_since_epoch = int(offset_specification.timestamp() * 1000)
|
|
304
|
+
# Create a timestamp instance
|
|
305
|
+
ts = timestamp(milliseconds_since_epoch)
|
|
306
|
+
self._filter_set[symbol(STREAM_OFFSET_SPEC)] = Described(
|
|
307
|
+
symbol(STREAM_OFFSET_SPEC), ts
|
|
308
|
+
)
|
|
309
|
+
|
|
295
310
|
def _filter_values(self, filters: list[str]) -> None:
|
|
296
311
|
"""
|
|
297
312
|
Set the filter values for the stream.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|