stinger-python-utils 0.4.0__py3-none-any.whl → 0.5.0__py3-none-any.whl
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.
- stinger_python_utils/message_creator.py +8 -1
- {stinger_python_utils-0.4.0.dist-info → stinger_python_utils-0.5.0.dist-info}/METADATA +1 -1
- stinger_python_utils-0.5.0.dist-info/RECORD +7 -0
- stinger_python_utils-0.4.0.dist-info/RECORD +0 -7
- {stinger_python_utils-0.4.0.dist-info → stinger_python_utils-0.5.0.dist-info}/WHEEL +0 -0
- {stinger_python_utils-0.4.0.dist-info → stinger_python_utils-0.5.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -246,6 +246,7 @@ class MessageCreator:
|
|
|
246
246
|
retain=False,
|
|
247
247
|
content_type=content_type,
|
|
248
248
|
response_topic=response_topic,
|
|
249
|
+
message_expiry_interval=5,
|
|
249
250
|
correlation_data=(
|
|
250
251
|
correlation_id.encode("utf-8")
|
|
251
252
|
if isinstance(correlation_id, str)
|
|
@@ -325,6 +326,7 @@ class MessageCreator:
|
|
|
325
326
|
request_obj: BaseModel,
|
|
326
327
|
response_topic: str,
|
|
327
328
|
correlation_id: Union[str, bytes, None] = None,
|
|
329
|
+
expiry_seconds: Optional[int] = None,
|
|
328
330
|
) -> Message:
|
|
329
331
|
return cls.binary_request_message(
|
|
330
332
|
topic,
|
|
@@ -332,6 +334,7 @@ class MessageCreator:
|
|
|
332
334
|
"application/json",
|
|
333
335
|
response_topic,
|
|
334
336
|
correlation_id,
|
|
337
|
+
expiry_seconds,
|
|
335
338
|
)
|
|
336
339
|
|
|
337
340
|
@classmethod
|
|
@@ -342,12 +345,13 @@ class MessageCreator:
|
|
|
342
345
|
content_type: str,
|
|
343
346
|
response_topic: str,
|
|
344
347
|
correlation_id: Union[str, bytes, None] = None,
|
|
348
|
+
expiry_seconds: Optional[int] = None,
|
|
345
349
|
) -> Message:
|
|
346
350
|
cls._validate_topic(topic)
|
|
347
351
|
cls._validate_topic(response_topic, "response_topic")
|
|
348
352
|
if correlation_id is None:
|
|
349
353
|
correlation_id = str(uuid.uuid4())
|
|
350
|
-
|
|
354
|
+
msg = Message(
|
|
351
355
|
topic=topic,
|
|
352
356
|
payload=payload,
|
|
353
357
|
qos=1,
|
|
@@ -360,3 +364,6 @@ class MessageCreator:
|
|
|
360
364
|
else correlation_id
|
|
361
365
|
),
|
|
362
366
|
)
|
|
367
|
+
if expiry_seconds is not None:
|
|
368
|
+
msg.message_expiry_interval = expiry_seconds
|
|
369
|
+
return msg
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
stinger_python_utils/__init__.py,sha256=IjHRV0k2DNwvFrEHebmsXiBvmITE8nQUnsR07h9tVkU,7
|
|
2
|
+
stinger_python_utils/message_creator.py,sha256=Hgiu9bcmnu0JCOKpNFafiC0HacJ5n_4lzILIKugM3T4,12012
|
|
3
|
+
stinger_python_utils/return_codes.py,sha256=mqTKaJXctbtH3pHu9YsKP3H7TwP2X9CVmHCniH_JryU,5116
|
|
4
|
+
stinger_python_utils-0.5.0.dist-info/METADATA,sha256=Vv49Hx8NST76n4F_gq31tsvnwKPZ9VLcU_ioI6B-vQQ,2813
|
|
5
|
+
stinger_python_utils-0.5.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
6
|
+
stinger_python_utils-0.5.0.dist-info/licenses/LICENSE,sha256=_T-8ExmblJbhv-1AxC6XDVEHg1JdJA-126NvRiMqS-I,1070
|
|
7
|
+
stinger_python_utils-0.5.0.dist-info/RECORD,,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
stinger_python_utils/__init__.py,sha256=IjHRV0k2DNwvFrEHebmsXiBvmITE8nQUnsR07h9tVkU,7
|
|
2
|
-
stinger_python_utils/message_creator.py,sha256=X8c7auXi0oxq5HHObkEDbtRODzJJj0hhYJVCOCcJvl8,11739
|
|
3
|
-
stinger_python_utils/return_codes.py,sha256=mqTKaJXctbtH3pHu9YsKP3H7TwP2X9CVmHCniH_JryU,5116
|
|
4
|
-
stinger_python_utils-0.4.0.dist-info/METADATA,sha256=FEUXFqBuH-7QzjdEldnh8MYbqSpidHEc8GJ9FX5V4FI,2813
|
|
5
|
-
stinger_python_utils-0.4.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
6
|
-
stinger_python_utils-0.4.0.dist-info/licenses/LICENSE,sha256=_T-8ExmblJbhv-1AxC6XDVEHg1JdJA-126NvRiMqS-I,1070
|
|
7
|
-
stinger_python_utils-0.4.0.dist-info/RECORD,,
|
|
File without changes
|
{stinger_python_utils-0.4.0.dist-info → stinger_python_utils-0.5.0.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|