dirigent-block-queues 0.17.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.
- dirigent_block_queues-0.17.1/LICENSE +18 -0
- dirigent_block_queues-0.17.1/PKG-INFO +25 -0
- dirigent_block_queues-0.17.1/README.md +10 -0
- dirigent_block_queues-0.17.1/pyproject.toml +31 -0
- dirigent_block_queues-0.17.1/pyproject.toml.orig +29 -0
- dirigent_block_queues-0.17.1/src/dirigent_block_queues/__init__.py +32 -0
- dirigent_block_queues-0.17.1/src/dirigent_block_queues/kafka.py +810 -0
- dirigent_block_queues-0.17.1/src/dirigent_block_queues/messages.py +100 -0
- dirigent_block_queues-0.17.1/src/dirigent_block_queues/py.typed +0 -0
- dirigent_block_queues-0.17.1/src/dirigent_block_queues/rabbitmq.py +580 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Copyright (c) 2026 Morten Olav Hansen <morten@winterop.com>. All rights reserved.
|
|
2
|
+
|
|
3
|
+
This source code and accompanying documentation are the property of
|
|
4
|
+
Morten Olav Hansen. No license, express or implied, is granted to use, copy,
|
|
5
|
+
modify, merge, publish, distribute, sublicense, or sell copies of this
|
|
6
|
+
software or its derivatives.
|
|
7
|
+
|
|
8
|
+
The source is published for reference only. Any use beyond reading
|
|
9
|
+
requires written permission from the copyright holder.
|
|
10
|
+
|
|
11
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
12
|
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
13
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
|
|
14
|
+
IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES,
|
|
15
|
+
OR OTHER LIABILITY ARISING FROM THE USE OF THE SOFTWARE.
|
|
16
|
+
|
|
17
|
+
Third-party components redistributed with this software, and the licences they
|
|
18
|
+
carry, are listed in THIRD_PARTY_NOTICES.md.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dirigent-block-queues
|
|
3
|
+
Version: 0.17.1
|
|
4
|
+
Summary: The queue block family for dirigent: Kafka and RabbitMQ, with their connection kinds.
|
|
5
|
+
License-Expression: LicenseRef-Proprietary
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
9
|
+
Requires-Dist: aio-pika>=9.5.7
|
|
10
|
+
Requires-Dist: aiokafka>=0.12.0
|
|
11
|
+
Requires-Dist: dirigent-common==0.17.1
|
|
12
|
+
Requires-Dist: dirigent-plugin==0.17.1
|
|
13
|
+
Requires-Python: >=3.13
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
|
|
16
|
+
# dirigent-block-queues
|
|
17
|
+
|
|
18
|
+
The queue block family: `kafka.produce` and `rabbitmq.publish` send one message, and the
|
|
19
|
+
`kafka.consume` and `rabbitmq.consume` sensors wait for messages to arrive.
|
|
20
|
+
|
|
21
|
+
Each broker registers a connection kind of its own -- `kafka` and `rabbitmq` -- holding the
|
|
22
|
+
addresses, the credential and the TLS settings, so a step names a connection and a topic or a
|
|
23
|
+
queue. A consuming sensor parks the attempt until enough has arrived, and the place it has
|
|
24
|
+
read to is the sensor's cursor: a poke that parks commits nothing, so a batch too small to act
|
|
25
|
+
on is read again rather than lost.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# dirigent-block-queues
|
|
2
|
+
|
|
3
|
+
The queue block family: `kafka.produce` and `rabbitmq.publish` send one message, and the
|
|
4
|
+
`kafka.consume` and `rabbitmq.consume` sensors wait for messages to arrive.
|
|
5
|
+
|
|
6
|
+
Each broker registers a connection kind of its own -- `kafka` and `rabbitmq` -- holding the
|
|
7
|
+
addresses, the credential and the TLS settings, so a step names a connection and a topic or a
|
|
8
|
+
queue. A consuming sensor parks the attempt until enough has arrived, and the place it has
|
|
9
|
+
read to is the sensor's cursor: a poke that parks commits nothing, so a batch too small to act
|
|
10
|
+
on is read again rather than lost.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "dirigent-block-queues"
|
|
3
|
+
version = "0.17.1"
|
|
4
|
+
description = "The queue block family for dirigent: Kafka and RabbitMQ, with their connection kinds."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.13"
|
|
7
|
+
license = "LicenseRef-Proprietary"
|
|
8
|
+
license-files = ["LICENSE"]
|
|
9
|
+
classifiers = [
|
|
10
|
+
"Programming Language :: Python :: 3",
|
|
11
|
+
"Programming Language :: Python :: 3.13",
|
|
12
|
+
]
|
|
13
|
+
dependencies = [
|
|
14
|
+
"aio-pika>=9.5.7",
|
|
15
|
+
"aiokafka>=0.12.0",
|
|
16
|
+
"dirigent-common==0.17.1",
|
|
17
|
+
"dirigent-plugin==0.17.1",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[project.entry-points."dirigent.plugins.v1"]
|
|
21
|
+
block-queues = "dirigent_block_queues:plugin"
|
|
22
|
+
|
|
23
|
+
[build-system]
|
|
24
|
+
requires = ["uv_build>=0.12.0,<0.13.0"]
|
|
25
|
+
build-backend = "uv_build"
|
|
26
|
+
|
|
27
|
+
[tool.uv.sources.dirigent-common]
|
|
28
|
+
workspace = true
|
|
29
|
+
|
|
30
|
+
[tool.uv.sources.dirigent-plugin]
|
|
31
|
+
workspace = true
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "dirigent-block-queues"
|
|
3
|
+
version = "0.17.1"
|
|
4
|
+
description = "The queue block family for dirigent: Kafka and RabbitMQ, with their connection kinds."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.13"
|
|
7
|
+
license = "LicenseRef-Proprietary"
|
|
8
|
+
license-files = ["LICENSE"]
|
|
9
|
+
classifiers = [
|
|
10
|
+
"Programming Language :: Python :: 3",
|
|
11
|
+
"Programming Language :: Python :: 3.13",
|
|
12
|
+
]
|
|
13
|
+
dependencies = [
|
|
14
|
+
"aio-pika>=9.5.7",
|
|
15
|
+
"aiokafka>=0.12.0",
|
|
16
|
+
"dirigent-common==0.17.1",
|
|
17
|
+
"dirigent-plugin==0.17.1",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[project.entry-points."dirigent.plugins.v1"]
|
|
21
|
+
block-queues = "dirigent_block_queues:plugin"
|
|
22
|
+
|
|
23
|
+
[build-system]
|
|
24
|
+
requires = ["uv_build>=0.12.0,<0.13.0"]
|
|
25
|
+
build-backend = "uv_build"
|
|
26
|
+
|
|
27
|
+
[tool.uv.sources]
|
|
28
|
+
dirigent-common = { workspace = true }
|
|
29
|
+
dirigent-plugin = { workspace = true }
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""The queue block family: producing to and consuming from Kafka and RabbitMQ."""
|
|
2
|
+
|
|
3
|
+
from dirigent_block_queues.kafka import KafkaConnectionKind, KafkaConsumeSensor, KafkaProduceOperator
|
|
4
|
+
from dirigent_block_queues.rabbitmq import RabbitConnectionKind, RabbitConsumeSensor, RabbitPublishOperator
|
|
5
|
+
from dirigent_plugin import Contribution, extension
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class QueuesBlocks:
|
|
9
|
+
"""The plugin object the host discovers under the dirigent.plugins.v1 entry-point group."""
|
|
10
|
+
|
|
11
|
+
@extension
|
|
12
|
+
def contribute(self) -> Contribution:
|
|
13
|
+
"""Contribute both brokers' blocks and the connection kinds they are addressed through."""
|
|
14
|
+
return Contribution(
|
|
15
|
+
operators=[KafkaProduceOperator(), RabbitPublishOperator()],
|
|
16
|
+
sensors=[KafkaConsumeSensor(), RabbitConsumeSensor()],
|
|
17
|
+
connection_kinds=[KafkaConnectionKind(), RabbitConnectionKind()],
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
plugin = QueuesBlocks()
|
|
22
|
+
|
|
23
|
+
__all__ = [
|
|
24
|
+
"KafkaConnectionKind",
|
|
25
|
+
"KafkaConsumeSensor",
|
|
26
|
+
"KafkaProduceOperator",
|
|
27
|
+
"QueuesBlocks",
|
|
28
|
+
"RabbitConnectionKind",
|
|
29
|
+
"RabbitConsumeSensor",
|
|
30
|
+
"RabbitPublishOperator",
|
|
31
|
+
"plugin",
|
|
32
|
+
]
|