Skip to content

Commit

Permalink
[#69]: fix: add queue name to received job
Browse files Browse the repository at this point in the history
  • Loading branch information
rustatian authored May 18, 2023
2 parents 39fe40f + 4de9057 commit 8299ddc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion amqpjobs/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ func (d *Driver) Push(ctx context.Context, job jobs.Job) error {
ctx, span := trace.SpanFromContext(ctx).TracerProvider().Tracer(tracerName).Start(ctx, "amqp_push")
defer span.End()

if d.routingKey == "" {
if d.routingKey == "" && d.exchangeType != "fanout" {
return errors.Str("empty routing key, consider adding the routing key name to the AMQP configuration")
}

Expand Down
1 change: 1 addition & 0 deletions amqpjobs/item.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ func (d *Driver) unpack(deliv amqp.Delivery) (*Item, error) {
multipleAsk: d.multipleAck,
requeue: d.requeueOnFail,
requeueFn: d.handleItem,
Queue: d.queue,
},
}

Expand Down

0 comments on commit 8299ddc

Please sign in to comment.