Skip to content

Commit

Permalink
proxy publish
Browse files Browse the repository at this point in the history
  • Loading branch information
asim committed Feb 23, 2019
1 parent f1df0f6 commit b8f2092
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion client/rpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -515,8 +515,15 @@ func (r *rpcClient) Publish(ctx context.Context, msg Message, opts ...PublishOpt
md["Micro-Topic"] = msg.Topic()
md["Micro-Id"] = id

// get the routing exchange
// set the 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 {
topic = options.Exchange
}
Expand Down

0 comments on commit b8f2092

Please sign in to comment.