@@ -49,15 +49,18 @@ public void start() {
4949 if (!running .compareAndSet (false , true )) {
5050 return ;
5151 }
52- log .info ("Starting SubscriptionEventConsumer for queue {}" , properties .queueName ());
52+ log .info ("Starting SubscriptionEventConsumer for queue {}" ,
53+ properties .queueName ());
5354 executor .submit (this ::consumeLoop );
5455 }
5556
5657 private void consumeLoop () {
57- log .info ("Starting RabbitMQ consumer loop for queue {}" , properties .queueName ());
58+ log .info ("Starting RabbitMQ consumer loop for queue {}" ,
59+ properties .queueName ());
5860 while (running .get ()) {
5961 try (Channel channel = newChannel ()) {
60- log .info ("Created channel to RabbitMQ, consuming from queue {}" , properties .queueName ());
62+ log .info ("Created channel to RabbitMQ, consuming from queue {}" ,
63+ properties .queueName ());
6164 DeliverCallback callback = (consumerTag , delivery ) -> handleDelivery (channel , delivery );
6265 channel .basicConsume (properties .queueName (), false , callback , consumerTag -> {});
6366 if (channel .isOpen ()){
@@ -175,7 +178,9 @@ private Connection createConnection() throws IOException, TimeoutException {
175178 factory .setAutomaticRecoveryEnabled (true );
176179 factory .setNetworkRecoveryInterval (5000 );
177180 factory .setRequestedHeartbeat (30 );
178- log .info ("Attempting to create RabbitMQ connection to {}:{} with virtual host '{}'" , properties .host (), properties .port (), properties .virtualHost ());
181+ log .info ("Attempting to create RabbitMQ connection to " +
182+ " {}:{} with virtual host '{}'" ,
183+ properties .host (), properties .port (), properties .virtualHost ());
179184 return factory .newConnection ();
180185 }catch (IOException e ){
181186 log .info ("IOException in createConnection: {}" , e .getMessage ());
@@ -215,7 +220,9 @@ public synchronized void shutdown() {
215220 * Quick check whether an active connection exists.
216221 */
217222 public synchronized boolean isConnected () {
218- log .info ("Checking connection status: connection={}, connection.isOpen={}" , connection , connection != null ? connection .isOpen () : "n/a" );
223+ log .info ("Checking connection status: " +
224+ " connection={}, connection.isOpen={}" ,
225+ connection , connection != null ? connection .isOpen () : "n/a" );
219226 return connection != null && connection .isOpen ();
220227 }
221228
0 commit comments