Check the queue capacity before enqueuing events, and use the rails cache if available