Kombu Documentation

repository·main·Indexed 25 days ago

https://github.com/celery/kombu

A high-level Python messaging library providing an idiomatic interface for the AMQP protocol with support for pluggable transports including Redis, SQS, and MongoDB. Features include connection and channel pooling, message serialization and compression, and the pidbox module for managing remote commands via Mailbox and Node.

Tokens
16.6K
Snippets
39
Records
106
Agent score
85%

What's inside Kombu

  1. Use Azure Storage Queues as a Kombu Transport

    main
    The kombu.transport.azurestoragequeues module provides a transport implementation for using Azure Storage Queues as a messaging backend. It includes a Transport class for managing connections and a Channel class for message operations. To use this transport, you must ensure the necessary Azure dependencies are installed in your environment.
  2. Understand Messaging Scenarios in Kombu

    main

    Kombu supports several messaging patterns implemented via different exchange types:

    • Request/Reply: A message is addressed to a single recipient with a return address. This is achieved using direct exchanges.
    • Broadcast: A message is sent to all parties (zero, one, or many recipients). This is achieved using fanout exchanges.
    • Publish/Subscribe: Producers publish to topics, and consumers subscribe to specific topics. If no consumers are subscribed, the message is not delivered. If multiple consumers subscribe, all receive it. This is achieved using topic exchanges.
  3. Use the Virtual Transport for in-memory messaging

    main
    The kombu.transport.virtual module provides a base class for creating in-memory messaging transports. This is useful for testing or lightweight local messaging where a full broker like RabbitMQ is not required. The Transport class manages connections and channels, while the Channel class handles the actual messaging logic (exchanges, queues, and publishing).