File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 22 self :: connection:: { connection_event_loop, ConnectionControl } ,
33 crate :: { error:: Error , ConnectionOptions } ,
44 relay_rpc:: {
5- domain:: { SubscriptionId , Topic } ,
5+ domain:: { MessageId , SubscriptionId , Topic } ,
66 rpc:: {
77 BatchFetchMessages ,
88 BatchReceiveMessages ,
@@ -74,8 +74,10 @@ mod stream;
7474/// The message received from a subscription.
7575#[ derive( Debug ) ]
7676pub struct PublishedMessage {
77+ pub id : MessageId ,
7778 pub topic : Topic ,
7879 pub message : Arc < str > ,
80+ pub tag : u32 ,
7981 pub published_at : chrono:: DateTime < chrono:: Utc > ,
8082 pub received_at : chrono:: DateTime < chrono:: Utc > ,
8183}
@@ -86,8 +88,10 @@ impl PublishedMessage {
8688 let now = chrono:: Utc :: now ( ) ;
8789
8890 Self {
91+ id : request. id ( ) ,
8992 topic : data. topic . clone ( ) ,
9093 message : data. message . clone ( ) ,
94+ tag : data. tag ,
9195 // TODO: Set proper value once implemented.
9296 published_at : now,
9397 received_at : now,
Original file line number Diff line number Diff line change 3535 & self . data
3636 }
3737
38+ pub fn id ( & self ) -> MessageId {
39+ self . id
40+ }
41+
3842 /// Sends the response back to the Relay. The value is a
3943 /// `Result<T::Response, T::Error>` (see [`RequestPayload`] trait for
4044 /// details).
You can’t perform that action at this time.
0 commit comments