File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ func defaultPushConsumerOptions() consumerOptions {
118118 ConsumerModel : Clustering ,
119119 AutoCommit : true ,
120120 Resolver : primitive .NewHttpResolver ("DEFAULT" ),
121+ ConsumeTimestamp : time .Now ().Add (time .Minute * (- 30 )).Format ("20060102150405" ),
121122 }
122123 opts .ClientOptions .GroupName = "DEFAULT_CONSUMER"
123124 return opts
@@ -158,6 +159,24 @@ func WithConsumeMessageBatchMaxSize(consumeMessageBatchMaxSize int) Option {
158159 }
159160}
160161
162+ func WithConsumeTimestamp (consumeTimestamp string ) Option {
163+ return func (options * consumerOptions ) {
164+ options .ConsumeTimestamp = consumeTimestamp
165+ }
166+ }
167+
168+ func WithConsumerPullTimeout (consumerPullTimeout time.Duration ) Option {
169+ return func (options * consumerOptions ) {
170+ options .ConsumerPullTimeout = consumerPullTimeout
171+ }
172+ }
173+
174+ func WithConsumeConcurrentlyMaxSpan (consumeConcurrentlyMaxSpan int ) Option {
175+ return func (options * consumerOptions ) {
176+ options .ConsumeConcurrentlyMaxSpan = consumeConcurrentlyMaxSpan
177+ }
178+ }
179+
161180// WithChainConsumerInterceptor returns a ConsumerOption that specifies the chained interceptor for consumer.
162181// The first interceptor will be the outer most, while the last interceptor will be the inner most wrapper
163182// around the real call.
You can’t perform that action at this time.
0 commit comments