1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-06 08:16:03 +02:00

Revert "Get rid of dependence on 'Micro-Topic'"

This reverts commit 3ff6944336.
This commit is contained in:
maxinglun 2022-04-10 10:41:02 +08:00
parent 3ff6944336
commit 141bb0a557

View File

@ -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 {
@ -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,