taskiq-memphis
This library provides you with memphis broker for taskiq. You need python version >=3.8
Usage:
from taskiq_memphis import MemphisBroker
broker = MemphisBroker(
memphis_host="localhost",
username="root",
password="memphis",
)
@broker.task
async def the_best_task_ever() -> None:
print("The best task ever")
Configuration
MemphisBroker parameters:
memphis_host- host to memphis.port- memphis server port.username- username.connection_token- connection token.password- password for username.result_backend- custom result backend.task_id_generator- custom task_id genertaor.reconnect- turn on/off reconnection while connection is lost.max_reconnect- maximum reconnection attempts.reconnect_interval_ms- interval in milliseconds between reconnect attempts.timeout_ms- connection timeout in milliseconds.cert_file- path to tls cert file.key_file- path to tls key file.ca_file- path to tls ca file.consumer_batch_size- batch size for the consumer.destroy_station_on_shutdown- close station on shutdown.destroy_producer_on_shutdown- close producer on shutdown.destroy_consumer_on_shutdown- close consumer on shutdown.
Non-obvious things
You can configure memphis topic, consumer, producer and produce method with:
# Create broker
broker = MemphisBroker(
memphis_host="localhost",
username="root",
password="memphis",
destroy_station_on_shutdown=True,
)
# Configure station
broker.configure_station(...)
# Configure producer
broker.configure_producer(...)
# Configure produce method
broker.configure_produce_method(...)
# Configure consumer
broker.configure_consumer(...)
Memphis station parameters you can configure:
name- name of the station. Required.retention_type- type of message retention.retention_value- how long it takes to keep message, based on retention_type.storage_type- type of the storage, DISK or MEMORY.replicas- number of replicas.idempotency_window_ms- time frame in which idempotent messages will be tracked.schema_name- name of the schema. (You can create it only via memphis UI now)send_poison_msg_to_dls- send poisoned message to dead letter station or not.send_schema_failed_msg_to_dls- send schema failed message to dead letter station or not.tiered_storage_enabled- tiered storage enabled or not.
Memphis producer parameters you can configure:
producer_name- producer name. Required.generate_random_suffix- add suffix to producer name. Default -True. DON'T SET THIS VARIABLE TOFALSEIF YOU WANT TO USE MORE THAN ONE PRODUCER.
Memphis produce method parameters you can configure:
ack_wait_sec- wait ack time in seconds.headers-Headersinstance from memphis.async_produce- produce message in async way or not.
Memphis consumer parameters you can configure:
consumer_name- name of the consumer. Required.consumer_group- name of the consumer group.pull_interval_ms- interval in milliseconds between pulls.batch_size- pull batch size.batch_max_time_to_wait_ms- max time in milliseconds to wait between pulls.max_ack_time_ms- max time for ack a message in milliseconds.max_msg_deliveries- max number of message deliveries.generate_random_suffix- concatenate a random suffix to consumer's name. DON'T SET THIS VARIABLE TOFALSEIF YOU WANT TO USE MORE THAN ONE CONSUMER.start_consume_from_sequence- start consuming from a specific sequence.last_messages- consume the last N messages.
Metadata
Release files for taskiq-memphis 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| taskiq_memphis-0.2.0.tar.gz | 7.8 kB | Without provenance | Details for taskiq_memphis-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| taskiq_memphis-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for taskiq_memphis-0.2.0-py3-none-any.whl |
Total release size: 16.0 kB
Release files / taskiq_memphis-0.2.0.tar.gz
| Download URL | taskiq_memphis-0.2.0.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
47bd6e737733f0e97dd965e1fef5b37d9f4015316d7fa5cb3250077ef08232e5
|
|
BLAKE2b-256 checksum How to use checksums |
1ab1238e44ad6256fd07a11a6e180f24d4654e0cbef0b197f07fb25dc442ba61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.6 Linux/5.15.0-1038-azure
|
Release files / taskiq_memphis-0.2.0-py3-none-any.whl
| Download URL | taskiq_memphis-0.2.0-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29dd06407136f55452470ac737cb82b6624b987c526dde1a533dfe8966c8399c
|
|
BLAKE2b-256 checksum How to use checksums |
b6128691cb405ae496ba1f4df463d814cdcf59bda90719ec6eb4e34d1156a67b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.6 Linux/5.15.0-1038-azure
|
Security for taskiq-memphis 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.