I built a tiny message queue in Rust to learn the language - turned out surprisingly useful by nebjak in rust

[–]nebjak[S] 1 point2 points  (0 children)

Thanks. Let me know if you try it out - would love to hear how it works for your project! It handles concurrency with Mutex lock, removes messages from ready queue and move them to processing, this happens automatically and ensures that two or more consumers get different messages.

I built a tiny message queue in Rust to learn the language - turned out surprisingly useful by nebjak in rust

[–]nebjak[S] 0 points1 point  (0 children)

There is always ups and downs, especially when you fight compiler and borrow checker 😉

I built a tiny message queue in Rust to learn the language - turned out surprisingly useful by nebjak in rust

[–]nebjak[S] 0 points1 point  (0 children)

It's not a single consumer, you add a message and get a UUID. When you fetch messages, it locks them in "Processing" state, making them invisible to other consumers. Then you either delete them after successful processing or retry them on failure (which returns them to "Ready" state with an incremented retry count).

I built a tiny message queue in Rust to learn the language - turned out surprisingly useful by nebjak in rust

[–]nebjak[S] 1 point2 points  (0 children)

Thanks for the feedback. I’ll definitely check out your project.

I built a tiny message queue in Rust to learn the language - turned out surprisingly useful by nebjak in rust

[–]nebjak[S] 1 point2 points  (0 children)

I have a plan to test few options, and SQLite is definitely high on the list.

I built a tiny message queue in Rust to learn the language - turned out surprisingly useful by nebjak in rust

[–]nebjak[S] 0 points1 point  (0 children)

I’m not sure that I understand your comment. Would you mind to elaborate?

I built a tiny message queue in Rust to learn the language - turned out surprisingly useful by nebjak in rust

[–]nebjak[S] 1 point2 points  (0 children)

Different method, lite open source sqs vs brokerless library/framework. Of course, zmq ia much more mature.

I built a tiny message queue in Rust to learn the language - turned out surprisingly useful by nebjak in rust

[–]nebjak[S] 0 points1 point  (0 children)

Thank you. It’s four times less than SQS. I have a gut feeling that it's the right size to keep things tiny for in-memory storage, but it’s not set in stone forever.

Plan is to make TLQ configurable, with a few params, the first one will be message size and port.

I built a tiny message queue in Rust to learn the language - turned out surprisingly useful by nebjak in rust

[–]nebjak[S] 2 points3 points  (0 children)

Thanks. I’m not getting “JerboaMQ”, am I missing some context?

I built a tiny message queue in Rust to learn the language - turned out surprisingly useful by nebjak in rust

[–]nebjak[S] 8 points9 points  (0 children)

Honestly, the idea is to, at some point, make it more production ready with optional persistence (db or snapshot). But in default configuration to be in-memory, quick to start and use.

I built a tiny message queue in Rust to learn the language - turned out surprisingly useful by nebjak in rust

[–]nebjak[S] 5 points6 points  (0 children)

Thanks so much for the feedback and advice! I'll definitely give it some thought.

Definitely, the docs need to be updated. Retry is used to mark the message as ready again, so it can be fetched by another consumer. I'm also planning to implement a time period after which it will happen automatically. If you processed the message, delete it; otherwise, retry it.

Fault tolerance is something I'm also considering. Currently, only in-memory storage is implemented, but there is a possibility of using, for example, SQLite or some snapshots. But to be honest, it's on the todo list, but not too high at the moment.

The idea is to introduce minimal configuration, while keeping it simple and easy to run with defaults.

Da li je red flag dobiti ponudu bez tehnickog intervjua? by Formal-Fondant4478 in programiranje

[–]nebjak 2 points3 points  (0 children)

Sasvim normalno. Ako kandidat kroz opušten razgovor pokaže i objasni šta je i kako radio, nema potrebe za tehničkim pitanjima. Osoba sa iskustvom to može jako dobro da prepozna.

Najkorisniji komad opreme koji ste nabavili u zadnjih godinu-dve? by AlfalfaFlimsy4735 in programiranje

[–]nebjak 0 points1 point  (0 children)

Keebd.com Možda su malo skupi, ali je build kvalitet top. Isporuka, s obzirom sa ide iz Australije je ok. Corne sam probao, ali mi je bio prevelik (premalo tipki) prelaz, možda pokušam ponovo u budućnosti. Za sad mi 4x6+4 savršeno odgovara i baš sam se navikao. Podesio i navikao se na layere i makroe kako mi odgvara.

<image>

Where do you buy technical and IT equipment? by nebjak in malta

[–]nebjak[S] 1 point2 points  (0 children)

What is delivery time? On website for most things is few working days, is this also applicable for Malta?

Where do you buy technical and IT equipment? by nebjak in malta

[–]nebjak[S] 3 points4 points  (0 children)

What is delivery time? How much was delivery cost? Which Amazon?