Skip to content

[QUERY] Excessive WARN logging when reading messages from an Azure Service Bus Topic subscription #43712

Open
@jochenhebbrecht

Description

@jochenhebbrecht

Query/Question
azure-messaging-servicebus exposes a lot of WARN log statements. Is there something wrong in our setup?

Why is this not a Bug or a feature Request?
We have a proper working Azure Service Bus client in Java, but we're bumping into very excessive logging making it hard to understand what is happening

Setup (please complete the following information if applicable):

  • OS: Linux
  • IDE: IntelliJ
  • Library/Libraries:
        <dependency>
            <groupId>com.azure</groupId>
            <artifactId>azure-messaging-servicebus</artifactId>
            <version>7.17.6</version>
        </dependency>

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Query Added
  • Setup information Added

Our client is initialized as:

public ServiceBusReceiverClient getClient() {
        return new ServiceBusClientBuilder()
            .connectionString(connectionString)
            .clientOptions(new ClientOptions().setApplicationId(applicationId))
            .retryOptions(new AmqpRetryOptions().setTryTimeout(Duration.ofSeconds(5)))
            .receiver()
            .topicName(topicName)
            .subscriptionName(subscription)
            .disableAutoComplete()
            .receiveMode(ServiceBusReceiveMode.PEEK_LOCK)
            .buildClient();
    }

We use it as:

 client.receiveMessages(MAX_MESSAGES, Duration.ofMinutes(MAX_WAIT_TIME_MINUTES))
                      .forEach(event -> {
                          log.info("Processing message: {}", event);
                          // Do some business logic here
                      });

But this results into following excessive warning logging:

2025-01-06 17:14:31 WARN - com.azure.core.amqp.implementation.MessageFlux : {"az.sdk.message":"The mediator is active.","messageFlux":"mf_3bf550_1735907333653","connectionId":"MF_02cd81_1735907333653","linkName":"my-topic-name/subscriptions/my-subscription_322ec6_1735907333653","entityPath":"my-topic-name/subscriptions/my-subscription"}
2025-01-06 17:14:31 WARN - com.azure.core.amqp.implementation.MessageFlux : {"az.sdk.message":"The mediator is active.","messageFlux":"mf_640200_1735905233639","connectionId":"MF_a04d0d_1735905233639","linkName":"my-topic-name/subscriptions/my-subscription_48d653_1735905233639","entityPath":"my-topic-name/subscriptions/my-subscription"}
2025-01-06 17:14:31 WARN - com.azure.core.amqp.implementation.MessageFlux : {"az.sdk.message":"Setting next mediator and waiting for activation.","messageFlux":"mf_3bf550_1735907333653","connectionId":"MF_02cd81_1735907333653","linkName":"my-topic-name/subscriptions/my-subscription_322ec6_1735907333653","entityPath":"my-topic-name/subscriptions/my-subscription"}
2025-01-06 17:14:31 WARN - com.azure.core.amqp.implementation.MessageFlux : {"az.sdk.message":"Setting next mediator and waiting for activation.","messageFlux":"mf_640200_1735905233639","connectionId":"MF_a04d0d_1735905233639","linkName":"my-topic-name/subscriptions/my-subscription_48d653_1735905233639","entityPath":"my-topic-name/subscriptions/my-subscription"}
2025-01-06 17:14:31 WARN - com.azure.core.amqp.implementation.MessageFlux : {"az.sdk.message":"Requesting a new mediator.","messageFlux":"mf_3bf550_1735907333653","connectionId":"MF_02cd81_1735907333653","linkName":"my-topic-name/subscriptions/my-subscription_322ec6_1735907333653","entityPath":"my-topic-name/subscriptions/my-subscription"}
2025-01-06 17:14:31 WARN - com.azure.core.amqp.implementation.MessageFlux : {"az.sdk.message":"Requesting a new mediator.","messageFlux":"mf_640200_1735905233639","connectionId":"MF_a04d0d_1735905233639","linkName":"my-topic-name/subscriptions/my-subscription_48d653_1735905233639","entityPath":"my-topic-name/subscriptions/my-subscription"}
2025-01-06 17:14:30 WARN - com.azure.core.amqp.implementation.MessageFlux : {"az.sdk.message":"The mediator is active.","messageFlux":"mf_c52022_1735909133667","connectionId":"MF_f72521_1735909133667","linkName":"my-topic-name/subscriptions/my-subscription_06aafc_1735909133667","entityPath":"my-topic-name/subscriptions/my-subscription"}
2025-01-06 17:14:30 WARN - com.azure.core.amqp.implementation.MessageFlux : {"az.sdk.message":"The mediator is active.","messageFlux":"mf_640200_1735905233639","connectionId":"MF_a04d0d_1735905233639","linkName":"my-topic-name/subscriptions/my-subscription_06aafc_1735909133667","entityPath":"my-topic-name/subscriptions/my-subscription"}

My question:
👉 A WARN gives me the indication that I'm doing something not 100% correct and I was wondering if I need to change something in my Java code, or if I should change my logging level for com.azure.core.amqp.implementation.MessageFlux to ERROR?
Even when there are no messages on the queue, we are being flooded with these WARN statements

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.Service Busbacklogcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions