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

[Feature] Support disruptor as memory queue #4788

Open
2 of 3 tasks
qqeasonchen opened this issue Mar 11, 2024 · 6 comments · May be fixed by #4844
Open
2 of 3 tasks

[Feature] Support disruptor as memory queue #4788

qqeasonchen opened this issue Mar 11, 2024 · 6 comments · May be fixed by #4844
Labels

Comments

@qqeasonchen
Copy link
Contributor

Search before asking

  • I had searched in the issues and found no similar issues.

Feature Request

Support disruptor[1] as memory queue, for event processing.

  1. https://github.com/LMAX-Exchange/disruptor

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@jevinjiang
Copy link
Contributor

I want to try it. Can you tell me where to start?

@Pil0tXia
Copy link
Member

Pil0tXia commented Mar 18, 2024

@jevinjiang The existing standalone storage-plugin used a BlockingQueue as Event Store in EventMesh Runtime JVM memory. We'd like to use disrupter to substitue BlockingQueue.

@jevinjiang
Copy link
Contributor

@Pil0tXia thank you~
Let me confirm what I need to do:
Replacing org.apache.eventmesh.storage.standalone.broker.MessageQueue(BlockingQueue) with disruptor in standalone storage-plugin

@jevinjiang
Copy link
Contributor

I have a question while modifying the MessageQueue. If there are no subscribers, can I create a MessageQueue to store messages? 我有一个疑问, 如果说一个messageQueue不存在订阅者,我应该创建它吗

@jevinjiang
Copy link
Contributor

I think disruptor is not suitable for long-term storage of events。

@Pil0tXia
Copy link
Member

while modifying the MessageQueue. If there are no subscribers, can I create a MessageQueue to store messages?

The ideal relationship between producer, MessageQueue, and consumer is one-to-one-to-one. A consumer cannot subscribe to or retrieve messages from a non-existent MessageQueue. If the consumer declares the queue, there is a potential risk of discarding messages sent by the producer before declaring the queue. After a producer creates a new MessageQueue, you need to ensure that there is a corresponding consumer subscribing to this queue.

I think disruptor is not suitable for long-term storage of events

Messages stored in standalone mode will be lost after a reboot. This is acceptable.

jevinjiang added a commit to jevinjiang/eventmesh that referenced this issue Apr 16, 2024
jevinjiang pushed a commit to jevinjiang/eventmesh that referenced this issue Apr 16, 2024
@jevinjiang jevinjiang linked a pull request Apr 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants