Skip to content

Commit

Permalink
use custom queue/exchange name
Browse files Browse the repository at this point in the history
  • Loading branch information
shenbaise9527 committed Dec 10, 2020
1 parent 705fed4 commit 085fbb9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions reporter/amqp/amqp.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,24 +138,24 @@ func (r *rmqReporter) Send(s model.SpanModel) {
Body: m,
}

err = r.channel.Publish(defaultRmqExchange, defaultRmqRoutingKey, false, false, msg)
err = r.channel.Publish(r.exchange, r.queue, false, false, msg)
if err != nil {
r.e <- fmt.Errorf("failed when publishing the span: %s\n", err.Error())
}
}

func (r *rmqReporter) queueBindVerify() error {
return r.channel.QueueBind(
defaultRmqRoutingKey,
defaultRmqRoutingKey,
defaultRmqExchange,
r.queue,
r.queue,
r.exchange,
false,
nil)
}

func (r *rmqReporter) exchangeVerify() error {
err := r.channel.ExchangeDeclare(
defaultRmqExchange,
r.exchange,
defaultExchangeKind,
true,
false,
Expand All @@ -173,7 +173,7 @@ func (r *rmqReporter) exchangeVerify() error {

func (r *rmqReporter) queueVerify() error {
_, err := r.channel.QueueDeclare(
defaultRmqExchange,
r.queue,
true,
false,
false,
Expand Down

0 comments on commit 085fbb9

Please sign in to comment.