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

feat: proposals for implementing msg batching to resources #66

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

terry-xiaoyu
Copy link
Contributor

No description provided.

@terry-xiaoyu terry-xiaoyu self-assigned this Jul 11, 2022
@terry-xiaoyu terry-xiaoyu force-pushed the msg-cache-for-resources branch 2 times, most recently from 3632a39 to 458cc3b Compare July 12, 2022 10:36

We prefer the `replayq`, mainly because in this feature messages are always added and accessed in a queue, we never access data by primary keys like a KV database. This is exactly the applicable scenario of `replayq`. The data files will be stored in the specified directory of the local file system, which is very simple.

The `replayq` was added to the Erlang Kafka driver in 2018, it has experienced several emqx versions and has been proved to be very stable.
Copy link
Contributor

Choose a reason for hiding this comment

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

replayq has its limitations, we may list them here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What limitations does it have?

active/0021-msg-batch-for-resources.md Show resolved Hide resolved
active/0021-msg-batch-for-resources.md Outdated Show resolved Hide resolved
active/0021-msg-batch-for-resources.md Outdated Show resolved Hide resolved
@terry-xiaoyu terry-xiaoyu requested a review from ieQu1 July 15, 2022 04:35
@terry-xiaoyu terry-xiaoyu changed the title feat: proposals for implementing msg cache to resources feat: proposals for implementing msg batching to resources Jul 28, 2022
Comment on lines +130 to +131
- **query_mode**: if set to true, the caller of `emqx_resource:query/3` will be blocked until
the driver returns or timeouts; if set to false, the `emqx_resource:query/3` returns immediately.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- **query_mode**: if set to true, the caller of `emqx_resource:query/3` will be blocked until
the driver returns or timeouts; if set to false, the `emqx_resource:query/3` returns immediately.
- **query_mode**: if set to sync, the caller of `emqx_resource:query/3` will be blocked until
the driver returns or timeouts; if set to async, the `emqx_resource:query/3` returns immediately.

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