Usage Examples¶
These examples cover each way of using Pika: Connection, which is thread-safe and runs its own IOLoop on a background thread; the asynchronous adapters, which attach to an event loop you already have; and BlockingConnection, which is procedural and deprecated in favour of Connection.
- URLParameters
- Connecting asynchronously
- Blocking basic get
- Blocking consume
- Blocking consume with multiple hosts
- Blocking consumer generator
- Publishing with BlockingConnection and SelectConnection
- Delivery confirmations
- Mandatory publishing
- Asynchronous consumer
- Asynchronous publisher
- Asyncio consumer
- Twisted consumer
- Tornado consumer
- TLS mutual authentication
- Thread-safe consumer
- Thread-safe publisher
- Thread-safe publisher confirms
- Thread-safe long-running publisher
- Heartbeat and blocked-connection timeouts
- Direct reply-to