Skip to content

Commit

Permalink
Revert "Get rid of dependence on 'Micro-Topic'"
Browse files Browse the repository at this point in the history
This reverts commit 3ff6944.
  • Loading branch information
maxinglun committed Apr 10, 2022
1 parent 3ff6944 commit 141bb0a
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions plugins/broker/rabbitmq/rabbitmq.go
Expand Up @@ -7,9 +7,9 @@ import (
"sync"
"time"

"github.com/streadway/amqp"
"go-micro.dev/v4/broker"
"go-micro.dev/v4/cmd"
"github.com/streadway/amqp"
)

type rbroker struct {
Expand Down Expand Up @@ -267,13 +267,6 @@ func (r *rbroker) Subscribe(topic string, handler broker.Handler, opts ...broker
for k, v := range msg.Headers {
header[k], _ = v.(string)
}

// Get rid of dependence on 'Micro-Topic'
msgTopic := header["Micro-Topic"]
if msgTopic == "" {
header["Micro-Topic"] = msg.RoutingKey
}

m := &broker.Message{
Header: header,
Body: msg.Body,
Expand Down

0 comments on commit 141bb0a

Please sign in to comment.