Skip to content

Commit 120aab9

Browse files
committed
docs: add FAQ for batch_processor and async_batch_processor decorators
1 parent efd7665 commit 120aab9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: docs/utilities/batch.md

+6
Original file line numberDiff line numberDiff line change
@@ -1244,6 +1244,12 @@ Given a SQS batch where the first batch record succeeds and the second fails pro
12441244

12451245
Use context manager when you want access to the processed messages or handle `BatchProcessingError` exception when all records within the batch fail to be processed.
12461246

1247+
### What's the difference between the decorator and process_partial_response functions?
1248+
1249+
`batch_processor` and `async_batch_processor` decorators are now considered legacy. Historically, they were kept due to backwards compatibility and to minimize code changes between V1 and V2.
1250+
1251+
As 2.12.0, `process_partial_response` and `async_process_partial_response` are the recommended instead. It reduces boilerplate, smaller memory/CPU cycles, and it makes it less error prone - e.g., decorators required an additional return.
1252+
12471253
### Integrating exception handling with Sentry.io
12481254

12491255
When using Sentry.io for error monitoring, you can override `failure_handler` to capture each processing exception with Sentry SDK:

0 commit comments

Comments
 (0)