Maintaining the current queue size in a SQL column would require updating the DB on every queue operation. Avoid that contention by instead looking up the current size on the in-memory durable queue struct, which is already tracked & updated as data enters & leaves the queue. |
||
---|---|---|
.. | ||
queue.go | ||
queue_test.go | ||
scanner.go | ||
scanner_test.go |