Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
jochenhebbrecht opened this issue Jan 6, 2025 · 2 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus

Comments

@jochenhebbrecht
Copy link

jochenhebbrecht commented Jan 6, 2025

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

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus labels Jan 6, 2025
Copy link

github-actions bot commented Jan 6, 2025

@anuchandy @conniey @lmolkova

Copy link

github-actions bot commented Jan 6, 2025

Thank you for your feedback. Tagging and routing to the team member best able to assist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus
Projects
None yet
Development

No branches or pull requests

2 participants