File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
_example/producer-consumer Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,9 @@ func main() {
3232
3333 // define the worker
3434 w := rabbitmq .NewWorker (
35- rabbitmq .WithSubj ("sample_2" ),
36- rabbitmq .WithExchangeType ("fanout" ),
35+ rabbitmq .WithSubj ("direct_queue" ),
36+ rabbitmq .WithExchangeType (rabbitmq .ExchangeDirect ),
37+ rabbitmq .WithExchangeName ("direct_queue" ),
3738 rabbitmq .WithRunFunc (func (ctx context.Context , m core.QueuedMessage ) error {
3839 var v * job
3940 if err := json .Unmarshal (m .Bytes (), & v ); err != nil {
Original file line number Diff line number Diff line change @@ -27,8 +27,9 @@ func main() {
2727
2828 // define the worker
2929 w := rabbitmq .NewWorker (
30- rabbitmq .WithSubj ("sample_2" ),
31- rabbitmq .WithExchangeType ("fanout" ),
30+ rabbitmq .WithSubj ("direct_queue" ),
31+ rabbitmq .WithExchangeType (rabbitmq .ExchangeDirect ),
32+ rabbitmq .WithExchangeName ("direct_queue" ),
3233 )
3334
3435 // define the queue
You can’t perform that action at this time.
0 commit comments