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

Incoming and outgoing messages count do not match #316

Closed
erickbp opened this issue Oct 9, 2019 · 13 comments
Closed

Incoming and outgoing messages count do not match #316

erickbp opened this issue Oct 9, 2019 · 13 comments

Comments

@erickbp
Copy link

erickbp commented Oct 9, 2019

Description

Queue has session enabled with 5 min lock duration for easy test. I'm reading messages with ISessionClient.AcceptMessageSessionAsync

I'm completing messages when they arrive (no processing delay)

No message lock is lost. My code receives the exact number of messages it sent (no message duplication received)

Actual Behavior

  1. When I look at the metrics it always shows more outgoing messages than income messages

Expected Behavior

  1. Incoming and outgoing messages should match

Is this how Service Bus works by design? maybe to accomplish the session work? or is the client library actually receiving duplicates and not sending them to my code? or is it just bad metrics on the azure portal?
Thanks
image
image

@valmol
Copy link

valmol commented Mar 4, 2020

I also noticed the same behaviour.
But a real cause was that some messages has been redelivered.

@AlexeyRaga
Copy link

I see this graph and I don't know how to interpret that. How the number of outgoing messages can be 4 times higher than the number of incoming messages?

image

Anyone has a suggesiton?

@SeanFeldman
Copy link
Contributor

One scenario I can think of is that you send messages in batches but receive either in smaller batches or one-by-one.

@JelmerOffenberg
Copy link

JelmerOffenberg commented Jul 2, 2020

I'm also seeing this behaviour and I'm curious to know what caused it. I have one topic with one subscriber and I sent a single message resulting in this chart.

afbeelding

@georgbergholz
Copy link

I have the same behaviour and think it depends on the ReceiveMode.
PeekLock needs a complete request and ReceiveAndDelete delete the message by reading.

@RobertPinson
Copy link

I'm also seeing this behaviour and I'm curious to know what caused it. I have one topic with one subscriber and I sent a single message resulting in this chart.

afbeelding

Hi @JelmerOffenberg Did you ever get an answer to this question? I am seeing the same in our SB queue more outgoing messages then incoming.

@rtwaddell
Copy link

We are seeing the same behavior, has anyone found an answer to this?

@jimzcoi
Copy link

jimzcoi commented Feb 22, 2021

Any progress with this strange behavior? Is there a viable explanation of this variance of values?

@DavidKlempfner
Copy link

I've got the same problem.
It's been almost 2 years since this was reported.
Can we get an answer please?
image

@aleprice
Copy link

aleprice commented Jun 9, 2021

Same issue
image

@MounicaChette
Copy link

Team, Is there is resolution or fix for this issue. I am also facing mismatch in sum of Incoming Messages and Outgoing messages. The messages are being pushed to topic one by one, where as, there is a webjob sceduled to read messages from topic in bulk mode. However, this behavior is strange. If i stop reading the messages, push all the messages, and then start reading the messages, then count of Incoming and Outgoing messages match.

image

@JelmerOffenberg
Copy link

I'm also seeing this behaviour and I'm curious to know what caused it. I have one topic with one subscriber and I sent a single message resulting in this chart.
afbeelding

Hi @JelmerOffenberg Did you ever get an answer to this question? I am seeing the same in our SB queue more outgoing messages then incoming.

@RobertPinson unfortunately this problem was never resolved for us! We contacted Microsoft support but we received no satisfying answer. Seems like another one of those unexplainable features of Azure services.

@EldertGrootenboer
Copy link
Contributor

Because these metrics are aggregated in time intervals these can be skewed, for example due to slightly different clocks and retry mechanisms, especially when using a Sum aggregation. We recommend using the Average metric instead. Moreover, this is expected behavior when using topics, as each message in a topic will be replicated to one or more subscriptions.

If you run into a specific instance where you see this kind of behavior which can not be explained by the above, please open a new issue, with reproduction steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests