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

Random Exchange Type #335

Open
snichme opened this issue Mar 22, 2022 · 5 comments
Open

Random Exchange Type #335

snichme opened this issue Mar 22, 2022 · 5 comments

Comments

@snichme
Copy link
Member

snichme commented Mar 22, 2022

Inspiration: https://github.com/rabbitmq/rabbitmq-server/tree/master/deps/rabbitmq_random_exchange

@thepabloaguilar
Copy link

Hi @snichme, I'd like to work on this implementation! Does that make sense yet? If so, just confirming the desired behavior:

  • Exchange A (random):
    • Queue A (routing key -> X)
    • Queue B (routing key -> X)
    • Queue C (routing key -> Z)
    • Queue C (routing key -> Y)

When an incoming message has set the routing key as "X" the exchange should pick randomly between A and B, right?

And talking about random stuff, I was thinking about using Random::PCG32. wdyt?

Btw, I'm an beginner in Crystal

@snichme
Copy link
Member Author

snichme commented Sep 25, 2024

Hi,

Happy to hear that you want to work on this. Do you want to build it for a use case or more to get into writing crystal?
Both are fine, I'm just curious.

There is a draft PR now: #786 that I'm working on that will change the interfaces for an exchange in LavinMQ so I think it's better wait until that PR has been merged and then start working on this.
I'm happy to review the PR and help you out with the code and structure if needed.

Using PCG32 makes sense I think.

@thepabloaguilar
Copy link

Happy to hear that you want to work on this. Do you want to build it for a use case or more to get into writing crystal?
Both are fine, I'm just curious.

None of them 😆
I want to get into writing interesting code (or code different from my day-to-day work in the company), I've already contribute to some large projects like Argo but the process to get the code merged is somehow cumbersome and here seems a nice place to contribute!

Do you think it'll be better to wait your PR to be merged for this issue?

@kickster97
Copy link
Member

Hello! I'm glad you are taking an interest in this project :)
I just wanted to chime in and say thet we already have a closed PR #467 regarding the random exchange that we got in last year. So if you start working on this, i would recommend to look through that one first 👍

@snichme
Copy link
Member Author

snichme commented Nov 6, 2024

@thepabloaguilar the PR #786 is now merged so if you are still interested in looking at this issue, please go ahead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants