using write_queue_t = std::vector<write_req, queue_allocator_type>;
write_queue_t _write_queue; // NO MAXIMUM SIZE LIMIT
Every async_publish call adds a write_req to this queue. Each write_req holds:
- A const_buffer to the serialized MQTT PUBLISH packet (payload data)
- A completion handler (captures topic string)
Flow When Broker Is Unreachable
- async_publish → publish_send_op::send_publish() → async_send() → _write_queue.emplace_back() (line 164 of async_sender.hpp)
- do_write() calls _svc._stream.async_write()
- TCP async_write hangs (does not fail immediately when broker is unreachable — socket is in connecting/limbo state)
- write_reqs accumulate in _write_queue
- queue grows unbounded → OOM
Every async_publish call adds a write_req to this queue. Each write_req holds:
Flow When Broker Is Unreachable