File tree 2 files changed +6
-0
lines changed
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,10 @@ type Config struct {
139
139
Hostname string `opt:"hostname"`
140
140
UserAgent string `opt:"user_agent"`
141
141
142
+ // Topology hints allow nsqd to prefer same zone and same region consumers
143
+ TopologyRegion string `opt:"topology_region"`
144
+ TopologyZone string `opt:"topology_zone"`
145
+
142
146
// Duration of time between heartbeats. This must be less than ReadTimeout
143
147
HeartbeatInterval time.Duration `opt:"heartbeat_interval" default:"30s"`
144
148
// Integer percentage to sample the channel (requires nsqd 0.2.25+)
Original file line number Diff line number Diff line change @@ -344,6 +344,8 @@ func (c *Conn) identify() (*IdentifyResponse, error) {
344
344
ci ["output_buffer_timeout" ] = int64 (c .config .OutputBufferTimeout / time .Millisecond )
345
345
}
346
346
ci ["msg_timeout" ] = int64 (c .config .MsgTimeout / time .Millisecond )
347
+ ci ["topology_region" ] = c .config .TopologyRegion
348
+ ci ["topology_zone" ] = c .config .TopologyZone
347
349
cmd , err := Identify (ci )
348
350
if err != nil {
349
351
return nil , ErrIdentify {err .Error ()}
You can’t perform that action at this time.
0 commit comments