feat: separate broker

This commit is contained in:
Oarkflow
2024-10-05 18:34:24 +05:45
parent 324c6f691e
commit 40f5d0dad3
18 changed files with 508 additions and 1593 deletions

View File

@@ -2,13 +2,13 @@ package main
import (
"context"
mq2 "github.com/oarkflow/mq"
"github.com/oarkflow/mq/examples/tasks"
mq "github.com/oarkflow/mq/v2"
)
func main() {
b := mq.NewBroker(mq.WithCallback(tasks.Callback))
b := mq2.NewBroker(mq2.WithCallback(tasks.Callback))
// b := mq.NewBroker(mq.WithCallback(tasks.Callback), mq.WithTLS(true, "./certs/server.crt", "./certs/server.key"), mq.WithCAPath("./certs/ca.cert"))
b.NewQueue("queue1")
b.NewQueue("queue2")