@@ -66,7 +66,7 @@ public void Publish<TMessage>(TMessage message, string exchange, string routingK
6666 mandatory : true ,
6767 basicProperties : properties ,
6868 body : body . GetBytes ( ) ) ;
69- _logger . WriteLog ( _persistentConnection . Configuration . Level , $ "{ DateTimeOffset . Now . ToString ( " yyyy-MM-dd HH:mm:ss" ) } \t { exchange } \t { routingKey } \t { body } ") ;
69+ _logger . WriteLog ( _persistentConnection . Configuration . Level , $ "{ DateTimeOffset . Now : yyyy-MM-dd HH:mm:ss} \t { exchange } \t { routingKey } \t { body } ") ;
7070 _eventHandlerFactory ? . PubliushEvent ( new EventBusArgs ( _persistentConnection . Endpoint , exchange , "" , routingKey , type , _persistentConnection . Configuration . ClientProvidedName , body , true ) ) ;
7171 }
7272 public void Subscribe ( Type eventType , string type = ExchangeType . Topic )
@@ -134,7 +134,7 @@ public void Subscribe(Type eventType, string type = ExchangeType.Topic)
134134 #endregion
135135 channel . QueueBind ( queue , attr . Exchange , attr . RoutingKey , null ) ;
136136 channel . BasicQos ( 0 , _persistentConnection . Configuration . PrefetchCount , false ) ;
137- EventingBasicConsumer consumer = new EventingBasicConsumer ( channel ) ;
137+ EventingBasicConsumer consumer = new ( channel ) ;
138138 consumer . Received += async ( model , ea ) =>
139139 {
140140 string body = Encoding . UTF8 . GetString ( ea . Body . ToArray ( ) ) ;
@@ -153,7 +153,7 @@ public void Subscribe(Type eventType, string type = ExchangeType.Topic)
153153 finally
154154 {
155155 _eventHandlerFactory ? . SubscribeEvent ( new EventBusArgs ( _persistentConnection . Endpoint , ea . Exchange , queue , attr . RoutingKey , type , _persistentConnection . Configuration . ClientProvidedName , body , isAck ) ) ;
156- _logger . WriteLog ( _persistentConnection . Configuration . Level , $ "{ DateTimeOffset . Now . ToString ( " yyyy-MM-dd HH:mm:ss" ) } \t { isAck } \t { ea . Exchange } \t { ea . RoutingKey } \t { body } ") ;
156+ _logger . WriteLog ( _persistentConnection . Configuration . Level , $ "{ DateTimeOffset . Now : yyyy-MM-dd HH:mm:ss} \t { isAck } \t { ea . Exchange } \t { ea . RoutingKey } \t { body } ") ;
157157 if ( ! isAck )
158158 {
159159 await Task . Delay ( millisecondsDelay ) ;
0 commit comments