File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ func main() {
3030
3131 // define the worker
3232 w := rabbitmq .NewWorker (
33- rabbitmq .WithSubj ("sample_1" ),
33+ rabbitmq .WithSubj ("sample_worker" ),
34+ rabbitmq .WithExchangeName ("sample_worker" ),
35+ rabbitmq .WithRoutingKey ("sample_worker" ),
3436 rabbitmq .WithRunFunc (func (ctx context.Context , m core.QueuedMessage ) error {
3537 var v * job
3638 if err := json .Unmarshal (m .Bytes (), & v ); err != nil {
@@ -43,7 +45,7 @@ func main() {
4345
4446 // define the queue
4547 q , err := queue .NewQueue (
46- queue .WithWorkerCount (10 ),
48+ queue .WithWorkerCount (5 ),
4749 queue .WithWorker (w ),
4850 )
4951 if err != nil {
Original file line number Diff line number Diff line change @@ -217,6 +217,8 @@ func TestGoroutinePanic(t *testing.T) {
217217 }
218218 w := NewWorker (
219219 WithSubj ("GoroutinePanic" ),
220+ WithRoutingKey ("GoroutinePanic" ),
221+ WithExchangeName ("GoroutinePanic" ),
220222 WithRunFunc (func (ctx context.Context , m core.QueuedMessage ) error {
221223 panic ("missing something" )
222224 }),
You can’t perform that action at this time.
0 commit comments