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() {
30
30
31
31
// define the worker
32
32
w := rabbitmq .NewWorker (
33
- rabbitmq .WithSubj ("sample_1" ),
33
+ rabbitmq .WithSubj ("sample_worker" ),
34
+ rabbitmq .WithExchangeName ("sample_worker" ),
35
+ rabbitmq .WithRoutingKey ("sample_worker" ),
34
36
rabbitmq .WithRunFunc (func (ctx context.Context , m core.QueuedMessage ) error {
35
37
var v * job
36
38
if err := json .Unmarshal (m .Bytes (), & v ); err != nil {
@@ -43,7 +45,7 @@ func main() {
43
45
44
46
// define the queue
45
47
q , err := queue .NewQueue (
46
- queue .WithWorkerCount (10 ),
48
+ queue .WithWorkerCount (5 ),
47
49
queue .WithWorker (w ),
48
50
)
49
51
if err != nil {
Original file line number Diff line number Diff line change @@ -217,6 +217,8 @@ func TestGoroutinePanic(t *testing.T) {
217
217
}
218
218
w := NewWorker (
219
219
WithSubj ("GoroutinePanic" ),
220
+ WithRoutingKey ("GoroutinePanic" ),
221
+ WithExchangeName ("GoroutinePanic" ),
220
222
WithRunFunc (func (ctx context.Context , m core.QueuedMessage ) error {
221
223
panic ("missing something" )
222
224
}),
You can’t perform that action at this time.
0 commit comments