diff --git a/eventbus.yml b/eventbus.yml index 3812068..96a18ec 100644 --- a/eventbus.yml +++ b/eventbus.yml @@ -8,13 +8,15 @@ heartbeat: 30 # # NOTE: there is a default "all" channel which is used to broadcast information # to all clients. -channels: - # Stateful channels where clients may reconnect and pick up where they left - # off in the channel - stateful: - - tasks - - audit - # Stateless channels are those which operate on a "pub/sub" model, if a - # client misses a message, it's gone - stateless: - - all +# +# WARN: Channels are not merged with the default configuration, and will overwrite +# channels: +# stateful: +# - audit +# - tasks.for_auction +# - tasks.auction +# - tasks.bids +# stateless: +# - all +# - tasks.started +# - tasks.finished diff --git a/eventbus/src/lib.rs b/eventbus/src/lib.rs index c77ad8f..11012a0 100644 --- a/eventbus/src/lib.rs +++ b/eventbus/src/lib.rs @@ -7,6 +7,7 @@ extern crate serde_json; use actix::Message; use serde::{Deserialize, Serialize}; +use serde_json::Value; pub mod bus; pub mod client; @@ -35,5 +36,9 @@ pub enum Command { * The channel the client wishes to unsubscribe from */ channel: String, - } + }, + Publish { + channel: String, + payload: Value, + }, } diff --git a/eventbus/static/eventbus.yml b/eventbus/static/eventbus.yml index 9381332..3cbd76a 100644 --- a/eventbus/static/eventbus.yml +++ b/eventbus/static/eventbus.yml @@ -5,5 +5,10 @@ heartbeat: 60 channels: stateful: - audit + - tasks.for_auction + - tasks.auction + - tasks.bids stateless: - all + - tasks.started + - tasks.finished