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

redis as broker #369

Merged
merged 2 commits into from
Mar 30, 2021
Merged

redis as broker #369

merged 2 commits into from
Mar 30, 2021

Conversation

tonicmuroq
Copy link
Contributor

@tonicmuroq tonicmuroq commented Mar 24, 2021

redis 基本不能跟 etcd 比啊, 没有隔离性, 事务跟没有一样, 但是好像外围的操作一般都会加个锁, 似乎也是可以的...
另外就是自己去 pubsub 的话, 没办法处理 key expired 的情况, 所以只好开启 keyspace notification, 用 list 是不可以的, 用了 core 就没办法 scale out 了

@tonicmuroq tonicmuroq changed the title [WIP] redis as broker redis as broker Mar 27, 2021
@tonicmuroq
Copy link
Contributor Author

另外 in memory for unittest 的 redis 不支持 keyspace notification, 就依赖一个服务了, 每次要清空还只能 -p=1

"time"

"github.com/go-redis/redis/v8"
"github.com/muroq/redislock"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这么 personal 么

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... 要不 fork 到这个 namespace 也可以的, 是因为他把 ttl 捆绑到一起了, 我觉得这个行为非常诡异, 所以 fork 了修改了

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以考虑放 github.com/projecteru2/ 下面

@CMGS CMGS merged commit a2ba499 into master Mar 30, 2021
@CMGS CMGS deleted the redis-broker branch March 30, 2021 06:21
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