mirror of
				https://github.com/oarkflow/mq.git
				synced 2025-10-31 07:36:27 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			248 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			248 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))
 | |
| 	b.NewQueue("queue1")
 | |
| 	b.NewQueue("queue2")
 | |
| 	b.Start(context.Background())
 | |
| }
 | 
