Class ReceiptBatchProcessor
java.lang.Object
com.minicrm.mini_crm_api.messaging.ReceiptBatchProcessor
A dedicated background worker that consumes delivery receipts from a queue in
batches
and processes them for efficient database updates.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleReceiptBatch(List<DeliveryReceiptDTO> receipts) Listens to the delivery receipt queue and consumes messages in batches.
-
Constructor Details
-
ReceiptBatchProcessor
public ReceiptBatchProcessor()
-
-
Method Details
-
handleReceiptBatch
@RabbitListener(queues="${rabbitmq.receipt.queue.name}", containerFactory="batchListenerFactory") public void handleReceiptBatch(List<DeliveryReceiptDTO> receipts) Listens to the delivery receipt queue and consumes messages in batches. The batch size and timeout are configured in application.properties.- Parameters:
receipts- A list of DeliveryReceiptDTOs received from the queue.
-