Skip to content

Commit dfcc664

Browse files
committed
replicator-aws-sns: add pooling options
1 parent 03c3f30 commit dfcc664

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

examples/replicator-aws-sns/main.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,20 @@ func main() {
5454
flag.StringVar(&snsRegion, "sns-region", "", "AWS region where SNS topic is deployed")
5555

5656
flag.String("mode", "", "mode (ignored)")
57+
58+
adv := scyllacdc.AdvancedReaderConfig{}
59+
flag.DurationVar(&adv.ConfidenceWindowSize, "polling-confidence-window-size", 30*time.Second, "")
60+
flag.DurationVar(&adv.ChangeAgeLimit, "polling-change-age-limit", 10*time.Minute, "")
61+
flag.DurationVar(&adv.QueryTimeWindowSize, "pooling-query-time-window-size", 1*time.Minute, "")
62+
flag.DurationVar(&adv.PostEmptyQueryDelay, "polling-post-empty-query-delay", 30*time.Second, "")
63+
flag.DurationVar(&adv.PostNonEmptyQueryDelay, "polling-post-non-empty-query-delay", 10*time.Second, "")
64+
flag.DurationVar(&adv.PostFailedQueryDelay, "pooling-post-failed-query-delay", 1*time.Second, "")
65+
5766
flag.Parse()
5867

5968
clRead := parseConsistency(readConsistency)
6069
clWrite := parseConsistency(writeConsistency)
6170

62-
adv := scyllacdc.AdvancedReaderConfig{
63-
ConfidenceWindowSize: 30 * time.Second,
64-
ChangeAgeLimit: 10 * time.Minute,
65-
QueryTimeWindowSize: 60 * time.Second,
66-
PostEmptyQueryDelay: 30 * time.Second,
67-
PostNonEmptyQueryDelay: 10 * time.Second,
68-
PostFailedQueryDelay: 1 * time.Second,
69-
}
70-
7171
fmt.Println("Parameters:")
7272
fmt.Printf(" Keyspace: %s\n", keyspace)
7373
fmt.Printf(" Table: %s\n", table)

0 commit comments

Comments
 (0)