iggy-rs / iggy

Iggy is the persistent message streaming platform written in Rust, supporting QUIC, TCP and HTTP transport protocols, capable of processing millions of messages per second.
https://iggy.rs
MIT License
1.84k stars 85 forks source link

Is iggy embeddable? Can it be used as a library? #1007

Closed Froidoh closed 2 months ago

Froidoh commented 3 months ago

Hey!

I need a pub/sub system for a rust project and wondered whether iggy can be embedded in that application, so whether it has the ability to be used as a library.

Thanks for taking your time to answer!

hubcio commented 3 months ago

hey, in short, iggy consists of couple of parts:

when you are using iggy, you are required to have running server somewhere (you can host it anywhere) and you have to interact with it using library which is delivered to crates.io

regarding pub/sub, in principle we don't have it, but in theory you can implement it using iggy. in order to do that, you need to build consumer app, that will read stream and insert it to db or something like that, and other app which will write (append) data to the stream of consumer app

but I advise against it - there are better libraries for it - iggy is not a queue, so consumer has to navigate around the stream, so you don't get typical push notifications.

does that answer your question? :)

Froidoh commented 3 months ago

Yes it does, thank you very much and sorry for not making this a Discussion!