ic-event-hub library is promoted to
0.3.1 enabling event batching - special technique that allows canisters to save a lot of cycles by optimizing data transmission. Come try it out!
I’ve also released several tutorials on how this library could be used:
If you have any question about this library, ask it in this thread.
Have a nice day!
Is this a standalone canister? If so, what is the interface? Any motoko clients?
No, this is a Rust library. You can make your own canister with any interface you want.
I want to implement eventsourcing and CQRS using ic-event-hub on IC
I follow the tutorial 2: Tutorial: Efficient Canister Networking With ic-event-hub - DEV Community to type the code, but the listener can’t receive the event。Where did I type it wrong, or am I missing something?
the github：GitHub - lshoo/event_hub_example: ic-event-hub example
From the first look your code looks okay. You set a 20 seconds delay for event batches to form, it means it waits for at most 20 seconds from the moment you’ve emitted the event to the moment they’ll be sent to listeners.
Also, didn’t you forget to call
yes, I forget to call listerner.start_listening at dfx cmd, after I call start_listening, the listener received the events.
nice work! I wonder if it wouldn’t be better to rename the library to
ic-events or something like that. The name
hub may automatically lead people to think of a central canister.