HomePhabricator
Diffusion Comm c7c87fa04cab

[services] Tunnelbroker - Extracting `deleteQueueIfEmpty` logic to a separate…

Description

[services] Tunnelbroker - Extracting deleteQueueIfEmpty logic to a separate function

Summary:
This diff introduces extracting the deleteQueueIfEmpty calling for the DeliveryBroker into a separate function to call it in the following D6626 from the Rust gRPC handler.
The reason for extracting is disabling messages persisting in the DynamoDB database by the config flag introduced in the D6622. In the following D6626, we will call deleteQueueIfEmpty function, but skip to remove the messages from the database if the config flag from D6622 is presented.

Linear task: ENG-2641

Test Plan:

  1. CI gates are passed.
  2. Manual testing should be performed on the following D6626 diff.

Reviewers: jon, bartek

Reviewed By: jon, bartek

Subscribers: ashoat, tomek, atul

Differential Revision: https://phab.comm.dev/D6625