@@ -101,7 +101,8 @@ pub struct BrokerController {
101
101
pub ( crate ) cold_data_pull_request_hold_service : ColdDataPullRequestHoldService ,
102
102
pub ( crate ) cold_data_cg_ctr_service : ColdDataCgCtrService ,
103
103
pub ( crate ) broker_outer_api : BrokerOuterAPI ,
104
- pub ( crate ) message_store : Option < Box < dyn MessageStore > > ,
104
+ #[ cfg( feature = "local_file_store" ) ]
105
+ pub ( crate ) message_store : Option < LocalFileMessageStore > ,
105
106
pub ( crate ) timer_message_store : Option < TimerMessageStore > ,
106
107
pub ( crate ) replicas_manager : Option < ReplicasManager > ,
107
108
pub ( crate ) broker_server : Option < RocketmqDefaultServer > ,
@@ -160,7 +161,7 @@ impl BrokerController {
160
161
161
162
impl BrokerController {
162
163
pub async fn start ( & mut self ) {
163
- if self . message_store . is_some ( ) {
164
+ if self . message_store . as_mut ( ) . is_some ( ) {
164
165
let _ = self . message_store . as_mut ( ) . unwrap ( ) . start ( ) ;
165
166
}
166
167
@@ -206,7 +207,7 @@ impl BrokerController {
206
207
pub fn initialize_message_store ( & mut self ) -> bool {
207
208
if self . store_config . store_type == StoreType :: LocalFile {
208
209
info ! ( "Use local file as message store" ) ;
209
- self . message_store = Some ( Box :: < LocalFileMessageStore > :: default ( ) ) ;
210
+ self . message_store = Some ( LocalFileMessageStore :: default ( ) ) ;
210
211
} else if self . store_config . store_type == StoreType :: RocksDB {
211
212
info ! ( "Use RocksDB as message store" ) ;
212
213
} else {
0 commit comments