Azure / azure-service-bus-java

☁️ Java client library for Azure Service Bus
https://azure.microsoft.com/services/service-bus
MIT License
60 stars 59 forks source link

"No messages received" warning #304

Closed GMillerVarian closed 5 years ago

GMillerVarian commented 6 years ago

Using SubscriptionClient our log file is flooded with messages like the following:

WARN c.m.a.s.p.CoreMessageReceiver - No messages received from '<topic>/subscriptions/<subscription>'. Pending receive request timed out. Returning null to the client.

There is one entry added per minute, per subscription, which is polluting our log.

Should this not be a DEBUG entry, rather than a warning? Isn't it valid to receive no messages for an extended period of time, if there is no activity on a topic?

Under issue #255 one solution is to turn off logging for service bus. However, there are other useful entries which we want to keep in the log (ex. "Creating core message receiver"). Our log level is set to INFO.

Is it possible to disable just these "warnings", while allowing all other service bus log entries?

svuksic commented 5 years ago

I also have same problem. I want to disable just this message.

DT209 commented 5 years ago

+1 To Fix:

https://github.com/Azure/azure-service-bus-java/blob/2edad13482989ad7fcce72eb5883a8dff674aa6b/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/CoreMessageReceiver.java#L571

Change to

TRACE_LOGGER.debug("No messages received from '{}'. Pending receive request timed out. Returning null to the client.", CoreMessageReceiver.this.receivePath);

Note the only change is from warn to debug

Fix_toissue#304,_WARN_level_message_is_output_every_minute____Changing_so_that_it_isat.patch.txt

I added a *.patch file to fix this but was forced to rename it to *.patch.txt.

Blackbaud-MattWalsh commented 5 years ago

+1 change this to a debug instead of a warn. unless there's something we can do differently, this is just noise.

vstoyanov commented 5 years ago

This one should obviously be DEBUG and some WARN in the very same class should be ERROR. We are using ASB in a microservices context (what a surprise!) and on dev on some services this spam is >50% of the logs!!!!

This is not a critical issue only if application monitoring is not a concern.