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

User-defined operation types are supported when rb is full #818

Merged
merged 14 commits into from Jan 21, 2024

Conversation

RanMaoyi
Copy link
Contributor

@RanMaoyi RanMaoyi commented Jan 19, 2024

Support four ops when ring bus is full

 0 RB_FULL_NONE,       // do nothing, and return enqueue failed                                                                                                                                                         
 1 RB_FULL_DROP,        // drop all msgs in ring bus, and enqueue new msg                                                                                                                                                        
 2 RB_FULL_RETURN,   // Get and clean up all msgs from ring bus and return in aio                                                                                                                                                            
 3 RB_FULL_FILE,          // Get and clean up all msgs from ring bus and write them to file

User can specify which type of operation to use like

exchange_client.name {
     exchange {
         topic = "topic1",
         name = "exchange1",
         ringbus = {
             name = "ringbuffer1",
             cap = 100,
             #  0: RB_FULL_NONE
             #  1: RB_FULL_DROP
             #  2: RB_FULL_RETURN
             #  3: RB_FULL_FILE
             fullOp = 3
         }
     }
}

TODO: Parquet part is not supported now

0 RB_FULL_NONE,
1 RB_FULL_DROP,
2 RB_FULL_RETURN,
3 RB_FULL_FILE,

Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
… is full

Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
Copy link
Member

@JaylinYu JaylinYu left a comment

Choose a reason for hiding this comment

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

I guess this is your first step to implement MQTT Stream?

But not all MQ need a ringbus

@JaylinYu JaylinYu merged commit cf88701 into main Jan 21, 2024
16 checks passed
@JaylinYu JaylinYu deleted the moi/ringbuffer branch January 21, 2024 03:32
@JaylinYu
Copy link
Member

need to fix the warnings @RanMaoyi

Copy link
Member

@wanghaEMQ wanghaEMQ left a comment

Choose a reason for hiding this comment

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

cool

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.

None yet

4 participants