You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flag.Var(&nsq.ConfigFlag{cfg}, "reader-opt", "(deprecated) use --consumer-opt")
60
-
flag.Var(&nsq.ConfigFlag{cfg}, "consumer-opt", "option to passthrough to nsq.Consumer (may be given multiple times, http://godoc.org/github.com/nsqio/go-nsq#Config)")
61
58
59
+
flag.Var(&nsq.ConfigFlag{cfg}, "consumer-opt", "option to passthrough to nsq.Consumer (may be given multiple times, http://godoc.org/github.com/nsqio/go-nsq#Config)")
flag.Var(&nsq.ConfigFlag{cfg}, "reader-opt", "(deprecated) use --consumer-opt")
472
466
flag.Var(&nsq.ConfigFlag{cfg}, "consumer-opt", "option to passthrough to nsq.Consumer (may be given multiple times, http://godoc.org/github.com/nsqio/go-nsq#Config)")
473
-
474
467
flag.Parse()
475
468
476
469
if*showVersion {
@@ -505,20 +498,6 @@ func main() {
505
498
log.Fatalf("invalid --gzip-level value (%d), should be 1-9", *gzipLevel)
506
499
}
507
500
508
-
// TODO: remove, deprecated
509
-
ifhasArg("gzip-compression") {
510
-
log.Printf("WARNING: --gzip-compression is deprecated in favor of --gzip-level")
511
-
switch*gzipCompression {
512
-
case1:
513
-
*gzipLevel=gzip.BestSpeed
514
-
case2:
515
-
*gzipLevel=gzip.BestCompression
516
-
case3:
517
-
*gzipLevel=gzip.DefaultCompression
518
-
default:
519
-
log.Fatalf("invalid --gzip-compression value (%d), should be 1,2,3", *gzipCompression)
flag.Var(&nsq.ConfigFlag{cfg}, "reader-opt", "(deprecated) use --consumer-opt")
176
-
flag.Var(&nsq.ConfigFlag{cfg}, "consumer-opt", "option to passthrough to nsq.Consumer (may be given multiple times, http://godoc.org/github.com/nsqio/go-nsq#Config)")
177
-
178
165
varpublisherPublisher
179
166
varaddresses app.StringArray
180
167
varselectedModeint
181
168
169
+
cfg:=nsq.NewConfig()
170
+
171
+
flag.Var(&nsq.ConfigFlag{cfg}, "consumer-opt", "option to passthrough to nsq.Consumer (may be given multiple times, http://godoc.org/github.com/nsqio/go-nsq#Config)")
182
172
flag.Parse()
183
173
184
174
if*showVersion {
@@ -221,44 +211,16 @@ func main() {
221
211
}
222
212
223
213
switch*mode {
224
-
case"multicast":
225
-
log.Printf("WARNING: multicast mode is deprecated in favor of using separate nsq_to_http on different channels (and will be dropped in a future release)")
226
-
selectedMode=ModeAll
227
214
case"round-robin":
228
215
selectedMode=ModeRoundRobin
229
216
case"hostpool", "epsilon-greedy":
230
217
selectedMode=ModeHostPool
231
218
}
232
219
233
-
// TODO: remove, deprecated
234
-
ifhasArg("--round-robin") {
235
-
log.Printf("WARNING: --round-robin is deprecated in favor of --mode=round-robin")
236
-
selectedMode=ModeRoundRobin
237
-
}
238
-
239
-
// TODO: remove, deprecated
240
-
ifhasArg("throttle-fraction") {
241
-
log.Printf("WARNING: --throttle-fraction is deprecatedin favor of --sample=X")
242
-
*sample=*throttleFraction
243
-
}
244
-
245
220
if*sample>1.0||*sample<0.0 {
246
221
log.Fatal("ERROR: --sample must be between 0.0 and 1.0")
247
222
}
248
223
249
-
// TODO: remove, deprecated
250
-
ifhasArg("http-timeout-ms") {
251
-
log.Printf("WARNING: --http-timeout-ms is deprecated in favor of --http-timeout=X")
Copy file name to clipboardexpand all lines: apps/nsq_to_nsq/nsq_to_nsq.go
-11
Original file line number
Diff line number
Diff line change
@@ -48,9 +48,6 @@ var (
48
48
49
49
requireJSONField=flag.String("require-json-field", "", "for JSON messages: only pass messages that contain this field")
50
50
requireJSONValue=flag.String("require-json-value", "", "for JSON messages: only pass messages in which the required field has this value")
51
-
52
-
// TODO: remove, deprecated
53
-
maxBackoffDuration=flag.Duration("max-backoff-duration", 120*time.Second, "(deprecated) use --consumer-opt=max_backoff_duration,X")
54
51
)
55
52
56
53
funcinit() {
@@ -270,8 +267,6 @@ func main() {
270
267
cCfg:=nsq.NewConfig()
271
268
pCfg:=nsq.NewConfig()
272
269
273
-
// TODO: remove, deprecated
274
-
flag.Var(&nsq.ConfigFlag{cCfg}, "reader-opt", "(deprecated) use --consumer-opt")
275
270
flag.Var(&nsq.ConfigFlag{cCfg}, "consumer-opt", "option to passthrough to nsq.Consumer (may be given multiple times, see http://godoc.org/github.com/nsqio/go-nsq#Config)")
276
271
flag.Var(&nsq.ConfigFlag{pCfg}, "producer-opt", "option to passthrough to nsq.Producer (may be given multiple times, see http://godoc.org/github.com/nsqio/go-nsq#Config)")
277
272
@@ -328,12 +323,6 @@ func main() {
328
323
cCfg.UserAgent=defaultUA
329
324
cCfg.MaxInFlight=*maxInFlight
330
325
331
-
// TODO: remove, deprecated
332
-
ifhasArg("max-backoff-duration") {
333
-
log.Printf("WARNING: --max-backoff-duration is deprecated in favor of --consumer-opt=max_backoff_duration,X")
0 commit comments