proxy publish
This commit is contained in:
parent
f1df0f6dfe
commit
b8f20924cc
@ -515,8 +515,15 @@ func (r *rpcClient) Publish(ctx context.Context, msg Message, opts ...PublishOpt
|
|||||||
md["Micro-Topic"] = msg.Topic()
|
md["Micro-Topic"] = msg.Topic()
|
||||||
md["Micro-Id"] = id
|
md["Micro-Id"] = id
|
||||||
|
|
||||||
// get the routing exchange
|
// set the topic
|
||||||
topic := msg.Topic()
|
topic := msg.Topic()
|
||||||
|
|
||||||
|
// get proxy
|
||||||
|
if prx := os.Getenv("MICRO_PROXY"); len(prx) > 0 {
|
||||||
|
options.Exchange = prx
|
||||||
|
}
|
||||||
|
|
||||||
|
// get the exchange
|
||||||
if len(options.Exchange) > 0 {
|
if len(options.Exchange) > 0 {
|
||||||
topic = options.Exchange
|
topic = options.Exchange
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user