Files
mq/examples/server_tls.go
2024-10-01 12:28:12 +05:45

16 lines
320 B
Go

package main
import (
"context"
"github.com/oarkflow/mq"
"github.com/oarkflow/mq/examples/tasks"
)
func main() {
b := mq.NewBroker(mq.WithCallback(tasks.Callback), mq.WithTLS(true, "server.crt", "server.key"), mq.WithCAPath("ca.cert"))
b.NewQueue("queue1")
b.NewQueue("queue2")
b.Start(context.Background())
}