golang package cappedqueue
To quote the README.rst file:
cappedqueue is a simple package to make sure you can submit to a queue. Losing items is on purpose so that you can rely on not accidentally blocking or filling up your memory
cappedqueue_test.gofile for details on the usage...