func (r *queue) getQueueName(topic job.Topic) string {
	return fmt.Sprintf("%s_%s", r.prefix, topic)
}
getQueueName based on topic of job and the queue prefix.
package queue
import (
	"fmt"
	"github.com/changsongl/delay-queue/job"
	"github.com/changsongl/delay-queue/pkg/log"
	"github.com/changsongl/delay-queue/store"
	"github.com/prometheus/client_golang/prometheus"
	"strings"
	"sync"
	"time"
)
var (
	metricOnce sync.Once
)
type Queue interface {
	Push(*job.Job) error
	Pop(topic job.Topic) (job.NameVersion, error)
	PopWithBlockTime(topic job.Topic, blockTime time.Duration) (job.NameVersion, error)
}
type queue struct {
	s                store.Store           
	prefix           string                
	onFlightJobGauge *prometheus.GaugeVec  
	l                log.Logger            
}
func New(s store.Store, l log.Logger, name string) Queue {
	q := &queue{
		s:      s,
		prefix: name,
		l:      l,
	}
	q.CollectMetrics()
	return q
}
func (r *queue) Push(j *job.Job) error {
	que := r.getQueueName(j.Topic)
	prefix := r.getQueuePrefix()
	return r.s.PushJobToQueue(prefix, que, j)
}
func (r *queue) Pop(topic job.Topic) (job.NameVersion, error) {
	que := r.getQueueName(topic)
	return r.s.PopJobFromQueue(que)
}
func (r *queue) PopWithBlockTime(topic job.Topic, blockTime time.Duration) (job.NameVersion, error) {
	que := r.getQueueName(topic)
	return r.s.BPopJobFromQueue(que, blockTime)
}