mirror of
https://github.com/oarkflow/mq.git
synced 2025-10-05 07:57:00 +08:00
feat: Add connection
This commit is contained in:
6
queue.go
6
queue.go
@@ -36,9 +36,9 @@ func (b *Broker) NewQueue(name string) *Queue {
|
||||
consumers: memory.New[string, *consumer](),
|
||||
}
|
||||
b.deadLetter.Set(name, dlq)
|
||||
|
||||
go b.dispatchWorker(q)
|
||||
go b.dispatchWorker(dlq)
|
||||
ctx := context.Background()
|
||||
go b.dispatchWorker(ctx, q)
|
||||
go b.dispatchWorker(ctx, dlq)
|
||||
return q
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user