Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #568] Update lastPullTime use atomic.Value #613

Merged
merged 1 commit into from
Mar 16, 2021

Conversation

jerry-tao
Copy link
Contributor

[ISSUE #568] Update lastPullTime use atomic.Value as same with lastConsumeTime and lastLockTime

What is the purpose of the change

[ISSUE #568] Update lastPullTime use atomic.Value as same with lastConsumeTime and lastLockTime

Brief changelog

[ISSUE #568] Update lastPullTime use atomic.Value as same with lastConsumeTime and lastLockTime

Verifying this change


func main() {
	var nameSrv string
	var group string
	var topic string
	c, _ := rocketmq.NewPushConsumer(
		consumer.WithNameServer([]string{nameSrv}),
		consumer.WithConsumerModel(consumer.Clustering),
		consumer.WithGroupName(group),
	)
	_ = c.Subscribe(topic, consumer.MessageSelector{}, func(ctx context.Context, msgs ...*primitive.MessageExt) (consumer.ConsumeResult, error) {
		fmt.Printf("subscribe callback: %v \n", msgs)
		return consumer.ConsumeSuccess, nil
	})
	c.Start()
	n := make(chan os.Signal, 1)
	signal.Notify(n, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT, syscall.SIGSTOP)
	<-n

}

go run -race consumer.go

@codecov-io
Copy link

codecov-io commented Mar 5, 2021

Codecov Report

Merging #613 (08638a1) into master (6cd3181) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #613      +/-   ##
==========================================
- Coverage   24.46%   24.45%   -0.02%     
==========================================
  Files          48       48              
  Lines        5047     5051       +4     
==========================================
  Hits         1235     1235              
- Misses       3609     3613       +4     
  Partials      203      203              
Impacted Files Coverage Δ
consumer/process_queue.go 0.00% <0.00%> (ø)
consumer/push_consumer.go 11.38% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6cd3181...08638a1. Read the comment docs.

@ShannonDing ShannonDing merged commit d6e66a2 into apache:master Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants