Skip to content

Releases: taskiq-python/taskiq-aio-pika

0.6.0

Choose a tag to compare

@danfimov danfimov released this 28 Feb 12:24
cf89301

Description

Taskiq-aio-pika 0.6 is a significant technical release that aimed to address many of the current project design issues and unlock further improvements. We tried our best to minimize breaking changes, but unfortunately, some aspects were simply not working well. Therefore, we decided to break them in order to move forward.

This release includes:

  • Multi-queue support;
  • Custom settings for queues and exchanges for tasks;
  • Support for diffrent types of queues/exchanges;
  • A range of minor refactors and improvements.

Breaking changes

Broker parameters

AioPikaBroker now accepts new arguments during initialization. Queues and exchanges are configured using the Queue and Exchange classes and then passed to the broker. The old style of passing only names, routing keys or even unvalidated key arguments is no longer supported.

from taskiq_aio_pika import AioPikaBroker, Queue, QueueType, Exchange
from aio_pika.abc import ExchangeType

broker = AioPikaBroker(
    exchange=Exchange(
        name="custom_exchange",
        type=ExchangeType.TOPIC,
        declare=True,
        durable=True,
        auto_delete=False,
    )
    task_queues=[
        Queue(
            name="custom_queue",
            type=QueueType.CLASSIC,
            declare=True,
            durable=True,
            max_priority=10,
            routing_key="custom_queue",
        )
    ]
)

If declare=True is set, the queues and exchange will be declared automatically during broker initialization.

Multi-queue support

You can now define multiple queues for your tasks. Each queue can have its own routing key and settings, and workers can listen either to specific queues or to multiple queues at once.

broker = AioPikaBroker(
    exchange=Exchange(
        name="custom_exchange",
        type=ExchangeType.TOPIC,
        declare=True,
        durable=True,
        auto_delete=False,
    )
    task_queues=[
        Queue(
            name="custom_queue",
            routing_key="custom_queue",
        ),
        Queue(
            name="custom_queue_2",
            routing_key="custom_queue_2",
        ),
    ]
)

Once the broker is configured, you can route a task to a specific queue by adding a label:

await your_cool_task.kicker().with_labels(queue_name='custom_queue').kiq()

You can customize the label name used for routing in the broker configuration. Make sure that this label name does not collide with any other labels used in your project.

Full Changelog: 0.5.0...0.6.0

0.6.0rc0

0.6.0rc0 Pre-release
Pre-release

Choose a tag to compare

@danfimov danfimov released this 08 Dec 15:10

Description

Taskiq-aio-pika 0.6 is a significant technical release that aimed to address many of the current project design issues and unlock further improvements. We tried our best to minimize breaking changes, but unfortunately, some aspects were simply not working well. Therefore, we decided to break them in order to move forward.

This release includes:

  • Multi-queue support;
  • Custom settings for queues and exchanges for tasks;
  • Support for diffrent types of queues/exchanges;
  • A range of minor refactors and improvements.

Breaking changes

Broker parameters

AioPikaBroker now accepts new arguments during initialization. Queues and exchanges are configured using the Queue and Exchange classes and then passed to the broker. The old style of passing only names, routing keys or even unvalidated key arguments is no longer supported.

from taskiq_aio_pika import AioPikaBroker, Queue, QueueType, Exchange
from aio_pika.abc import ExchangeType

broker = AioPikaBroker(
    exchange=Exchange(
        name="custom_exchange",
        type=ExchangeType.TOPIC,
        declare=True,
        durable=True,
        auto_delete=False,
    )
    task_queues=[
        Queue(
            name="custom_queue",
            type=QueueType.CLASSIC,
            declare=True,
            durable=True,
            max_priority=10,
            routing_key="custom_queue",
        )
    ]
)

If declare=True is set, the queues and exchange will be declared automatically during broker initialization.

Multi-queue support

You can now define multiple queues for your tasks. Each queue can have its own routing key and settings, and workers can listen either to specific queues or to multiple queues at once.

broker = AioPikaBroker(
    exchange=Exchange(
        name="custom_exchange",
        type=ExchangeType.TOPIC,
        declare=True,
        durable=True,
        auto_delete=False,
    )
    task_queues=[
        Queue(
            name="custom_queue",
            routing_key="custom_queue",
        ),
        Queue(
            name="custom_queue_2",
            routing_key="custom_queue_2",
        ),
    ]
)

Once the broker is configured, you can route a task to a specific queue by adding a label:

await your_cool_task.kicker().with_labels(queue_name='custom_queue').kiq()

You can customize the label name used for routing in the broker configuration. Make sure that this label name does not collide with any other labels used in your project.

Full Changelog: 0.5.0...0.6.0rc0

0.5.0

Choose a tag to compare

@danfimov danfimov released this 25 Nov 08:58
ed4a0f9

What's Changed

Breaking changes

Chore

Full Changelog: 0.4.4...0.5.0

0.4.4

Choose a tag to compare

@s3rius s3rius released this 23 Oct 20:15
ff191ca

What's Changed

  • Fixed direct exchanges support. by @s3rius in #44

Full Changelog: 0.4.3...0.4.4

0.4.3

Choose a tag to compare

@s3rius s3rius released this 09 Jul 11:04
ddd8f73

What's Changed

New Contributors

Full Changelog: 0.4.2...0.4.3

0.4.2

Choose a tag to compare

@s3rius s3rius released this 20 Apr 23:31
5fa8506

What's Changed

  • Add LICENSE file by @tjnary in #33
  • Added float support for delay in AioPikaBroker by @GefMar in #38

New Contributors

Full Changelog: 0.4.1...0.4.2

0.4.1

Choose a tag to compare

@s3rius s3rius released this 14 Aug 20:13
91b0e56

What's Changed

  • add py.typed by @dimastbk in #26
  • chore: remove unused fallback for python 3.7 by @dimastbk in #27
  • Added py.typed directive to avoid mypy warnings by @joshvote in #28
  • Allow passing extra params to declare exchange and declare queues (duplicated with linter fixes) by @Steve-Bupyc in #31
  • Switch to gitflow and ruff. by @s3rius in #32

New Contributors

Full Changelog: 0.4.0...0.4.1

0.4.0

Choose a tag to compare

@s3rius s3rius released this 11 Jun 13:23

What's Changed

THIS RELEASE DROPS PYTHON3.7 SUPPORT DUE TO END OF LIFE.

Full Changelog: 0.3.0...0.4.0

0.3.0

Choose a tag to compare

@s3rius s3rius released this 11 Jun 13:22

What's Changed

New Contributors

Full Changelog: 0.2.2...0.3.0

0.2.2

Choose a tag to compare

@chandr-andr chandr-andr released this 21 May 16:19

What's Changed

  • Added rabbitmq-delayed-message-exchange plugin support to create delay messages. by @chandr-andr in #15

New Contributors

Full Changelog: 0.2.1...0.2.2