feat: Add connection

This commit is contained in:
sujit
2024-10-20 23:24:58 +05:45
parent a06396da56
commit 35a79be4ad
9 changed files with 201 additions and 149 deletions

View File

@@ -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
}