RedisFastProducer
faststream.redis.producer.RedisFastProducer #
RedisFastProducer(connection: Redis[bytes], parser: Union[None, AsyncCustomParser[OneMessage, OneRedisMessage], AsyncCustomParser[BatchMessage, BatchRedisMessage]], decoder: Union[None, AsyncCustomDecoder[OneRedisMessage], AsyncCustomDecoder[BatchRedisMessage]])
A class to represent a Redis producer.
Initialize the Redis producer.
PARAMETER | DESCRIPTION |
---|---|
connection | The Redis connection. TYPE: |
parser | The parser. TYPE: |
decoder | The decoder. TYPE: |
Source code in faststream/redis/producer.py
publish async
#
publish(message: SendableMessage, channel: Optional[str] = None, reply_to: str = '', headers: Optional[AnyDict] = None, correlation_id: Optional[str] = None, *, list: Optional[str] = None, stream: Optional[str] = None, rpc: bool = False, rpc_timeout: Optional[float] = 30.0, raise_timeout: bool = False, maxlen: Optional[int] = None) -> Optional[Any]