RabbitRoute
faststream.rabbit.broker.router.RabbitRoute
#
RabbitRoute(
call,
queue,
exchange=None,
*,
publishers=(),
consume_args=None,
dependencies=(),
parser=None,
decoder=None,
middlewares=(),
no_ack=EMPTY,
ack_policy=EMPTY,
no_reply=False,
title=None,
description=None,
include_in_schema=True,
)
Bases: SubscriberRoute
Class to store delayed RabbitBroker subscriber registration.
Just a copy of RabbitRegistrator.subscriber(...)
arguments.
Initialized RabbitRoute.
PARAMETER | DESCRIPTION |
---|---|
call
|
Message handler function
to wrap the same with
TYPE:
|
queue
|
RabbitMQ queue to listen.
FastStream declares and binds queue object to
TYPE:
|
exchange
|
RabbitMQ exchange to bind queue to. Uses default exchange if not present. FastStream declares exchange object automatically by default.
TYPE:
|
publishers
|
RabbitMQ publishers to broadcast the handler result.
TYPE:
|
consume_args
|
Extra consumer arguments to use in
TYPE:
|
dependencies
|
Dependencies list (
TYPE:
|
parser
|
Parser to map original IncomingMessage Msg to FastStream one.
TYPE:
|
decoder
|
Function to decode FastStream msg bytes body to python objects.
TYPE:
|
middlewares
|
Subscriber middlewares to wrap incoming message processing.
TYPE:
|
no_ack
|
Whether to disable FastStream auto acknowledgement logic or not. Scheduled to remove in 0.7.0
TYPE:
|
ack_policy
|
Acknowledgment policy for the subscriber (by default
TYPE:
|
no_reply
|
Whether to disable FastStream RPC and Reply To auto responses or not.
TYPE:
|
title
|
AsyncAPI subscriber object title.
TYPE:
|
description
|
AsyncAPI subscriber object description. Uses decorated docstring as default.
TYPE:
|
include_in_schema
|
Whetever to include operation in AsyncAPI schema or not.
TYPE:
|
Source code in faststream/rabbit/broker/router.py
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
|