Following comments in D4740 from the [[ https://phab.comm.dev/D4740#136831 | synchronization question ]] and forward, [[ https://linear.app/comm/issue/ENG-1495/amqp-cpp-client-throwing-a-segmentation-error-in-a-highmid-load-and | ENG-1495 ]] task, we should use a synchronization mechanism in access to the AMQP Client channel which is accessed from the different threads (gRPC threads + DeliveryBroker thread) by calling `send()` and `ack()` methods.
When the number of threads grows non-synchronized access to the shared channel causes a segmentation fault or `AMQP-CPP TCP Connection buffer error`.
This diff introduces the use of C++17 `std::scoped_lock` which provides a convenient RAII-style mechanism for owning a shared channel.
Usage of the `std::scoped_lock` was added to the `send()` and `ack()` methods which are called from the threads.