Queue Size shows 0 in metrics

Post Reply
vineet
Posts: 28
Joined: Sat May 06, 2017 7:06 pm

Queue Size shows 0 in metrics

Post by vineet » Fri Nov 20, 2020 2:15 pm

hi alt,

The Sent Queue always shows as 0. I have set speed of 1mps and sent 1500 messages but the queue always return 0.

Latest beta library version.

see log dump.

TX: Q:0, REQ: 147 (0.60 m/s), RSP: 145 (0.86 m/s); RX: Q:0, REQ: 145 (0.86 m/s), RSP: 147 (0.60 m/s)
TX: Q:0, REQ: 6 (0.03 m/s), RSP: 0 (NaN m/s); RX: Q:0, REQ: 0 (NaN m/s), RSP: 6 (0.03 m/s)
TX: Q:0, REQ: 1 (∞ m/s), RSP: 15 (0.07 m/s); RX: Q:0, REQ: 15 (0.07 m/s), RSP: 1 (∞ m/s)
TX: Q:0, REQ: 1 (∞ m/s), RSP: 8 (0.04 m/s); RX: Q:0, REQ: 8 (0.04 m/s), RSP: 1 (∞ m/s)
TX: Q:0, REQ: 1 (∞ m/s), RSP: 8 (0.04 m/s); RX: Q:0, REQ: 8 (0.04 m/s), RSP: 1 (∞ m/s)
TX: Q:0, REQ: 1 (∞ m/s), RSP: 44 (0.18 m/s); RX: Q:0, REQ: 44 (0.18 m/s), RSP: 1 (∞ m/s)
TX: Q:0, REQ: 152 (0.61 m/s), RSP: 150 (0.86 m/s); RX: Q:0, REQ: 150 (0.86 m/s), RSP: 152 (0.61 m/s)
TX: Q:0, REQ: 6 (0.03 m/s), RSP: 0 (NaN m/s); RX: Q:0, REQ: 0 (NaN m/s), RSP: 6 (0.03 m/s)
TX: Q:0, REQ: 1 (∞ m/s), RSP: 15 (0.07 m/s); RX: Q:0, REQ: 15 (0.07 m/s), RSP: 1 (∞ m/s)
TX: Q:0, REQ: 1 (∞ m/s), RSP: 8 (0.04 m/s); RX: Q:0, REQ: 8 (0.04 m/s), RSP: 1 (∞ m/s)
TX: Q:0, REQ: 1 (∞ m/s), RSP: 8 (0.04 m/s); RX: Q:0, REQ: 8 (0.04 m/s), RSP: 1 (∞ m/s)
TX: Q:0, REQ: 1 (∞ m/s), RSP: 44 (0.18 m/s); RX: Q:0, REQ: 44 (0.18 m/s), RSP: 1 (∞ m/s)
TX: Q:0, REQ: 157 (0.61 m/s), RSP: 155 (0.87 m/s); RX: Q:0, REQ: 155 (0.87 m/s), RSP: 157 (0.61 m/s)
TX: Q:0, REQ: 6 (0.03 m/s), RSP: 0 (NaN m/s); RX: Q:0, REQ: 0 (NaN m/s), RSP: 6 (0.03 m/s)
TX: Q:0, REQ: 1 (∞ m/s), RSP: 15 (0.07 m/s); RX: Q:0, REQ: 15 (0.07 m/s), RSP: 1 (∞ m/s)
TX: Q:0, REQ: 1 (∞ m/s), RSP: 8 (0.04 m/s); RX: Q:0, REQ: 8 (0.04 m/s), RSP: 1 (∞ m/s)
TX: Q:0, REQ: 1 (∞ m/s), RSP: 8 (0.04 m/s); RX: Q:0, REQ: 8 (0.04 m/s), RSP: 1 (∞ m/s)
TX: Q:0, REQ: 1 (∞ m/s), RSP: 44 (0.18 m/s); RX: Q:0, REQ: 44 (0.18 m/s), RSP: 1 (∞ m/s)
TX: Q:0, REQ: 162 (0.62 m/s), RSP: 160 (0.87 m/s); RX: Q:0, REQ: 160 (0.87 m/s), RSP: 162 (0.62 m/s)
TX: Q:0, REQ: 6 (0.03 m/s), RSP: 0 (NaN m/s); RX: Q:0, REQ: 0 (NaN m/s), RSP: 6 (0.03 m/s)
TX: Q:0, REQ: 1 (∞ m/s), RSP: 15 (0.07 m/s); RX: Q:0, REQ: 15 (0.07 m/s), RSP: 1 (∞ m/s)
TX: Q:0, REQ: 1 (∞ m/s), RSP: 8 (0.04 m/s); RX: Q:0, REQ: 8 (0.04 m/s), RSP: 1 (∞ m/s)
TX: Q:0, REQ: 1 (∞ m/s), RSP: 8 (0.04 m/s); RX: Q:0, REQ: 8 (0.04 m/s), RSP: 1 (∞ m/s)
TX: Q:0, REQ: 1 (∞ m/s), RSP: 45 (0.17 m/s); RX: Q:0, REQ: 45 (0.17 m/s), RSP: 1 (∞ m/s)
TX: Q:0, REQ: 167 (0.63 m/s), RSP: 165 (0.87 m/s); RX: Q:0, REQ: 165 (0.87 m/s), RSP: 167 (0.63 m/s)
TX: Q:0, REQ: 9 (0.02 m/s), RSP: 0 (NaN m/s); RX: Q:0, REQ: 0 (NaN m/s), RSP: 9 (0.02 m/s)
TX: Q:0, REQ: 1 (∞ m/s), RSP: 20 (0.06 m/s); RX: Q:0, REQ: 20 (0.06 m/s), RSP: 1 (∞ m/s)
TX: Q:0, REQ: 1 (∞ m/s), RSP: 12 (0.04 m/s); RX: Q:0, REQ: 12 (0.04 m/s), RSP: 1 (∞ m/s)
TX: Q:0, REQ: 1 (∞ m/s), RSP: 12 (0.04 m/s); RX: Q:0, REQ: 12 (0.04 m/s), RSP: 1 (∞ m/s)
TX: Q:0, REQ: 1 (∞ m/s), RSP: 65 (0.18 m/s); RX: Q:0, REQ: 65 (0.18 m/s), RSP: 1 (∞ m/s)
TX: Q:0, REQ: 364 (0.99 m/s), RSP: 362 (1.25 m/s); RX: Q:0, REQ: 362 (1.25 m/s), RSP: 364 (0.99 m/s)
alt
Site Admin
Posts: 871
Joined: Tue Apr 25, 2006 9:45 am

Re: Queue Size shows 0 in metrics

Post by alt » Fri Nov 20, 2020 5:13 pm

Hi vineet,

It means that library sends PDU immediately after serialization and remote side handles it fast enough.
SendSpeedLimit delays PDU before placing into the send queue.
vineet
Posts: 28
Joined: Sat May 06, 2017 7:06 pm

Re: Queue Size shows 0 in metrics

Post by vineet » Fri Nov 20, 2020 5:22 pm

So alt how we can get the count of messages that is inside the library for which pdu has not been sent.

And we are also getting esme_rmsgqful when we submitted in bulk with submitspeed of 240 any solution for this.
alt
Site Admin
Posts: 871
Joined: Tue Apr 25, 2006 9:45 am

Re: Queue Size shows 0 in metrics

Post by alt » Fri Nov 20, 2020 5:58 pm

With the version 2.9-beta you can use client.SendQueueLimit property to limit number of requests waiting for response which limits memory consumption for a smpp connection. It helps also to avoid ESME_RMSGQFUL (Message queue full) response status from the SMPP server.

The number of requests waiting for response you can read from metric: client.Metrics.Sent.Requests.WaitingForResponse

More about metrics https://docs.inetlab.com/smpp/v2.8/arti ... ml#metrics
vineet
Posts: 28
Joined: Sat May 06, 2017 7:06 pm

Re: Queue Size shows 0 in metrics

Post by vineet » Fri Nov 20, 2020 6:04 pm

please suggest a value for SendQueueLimit if normally batch submission is around 15k-25k to avoid ESME_RMSGQFUL. And shouldn't send speed limit should delay the message sending regardless how many are begin fed in queue.
vineet
Posts: 28
Joined: Sat May 06, 2017 7:06 pm

Re: Queue Size shows 0 in metrics

Post by vineet » Fri Nov 20, 2020 6:15 pm

The number of requests waiting for response you can read from metric: client.Metrics.Sent.Requests.WaitingForResponse i tried this it always shows 0 or 1. but my problem is i have submitted batch containing 50 messages.

IEnumerable<SubmitSmResp> ResponseList = (await SMPPClient.SubmitAsync(batch)).ToArray();

SubmitSpeed is set to 1 mps.

Library is processing at 1 mps but there is no way to check the number of pending messages inside the library. all metrics shows wrong info.

like it should show that 45 messages are still pending for processing out of 50.

in v1 of library you sendqueue shows this information properly.
alt
Site Admin
Posts: 871
Joined: Tue Apr 25, 2006 9:45 am

Re: Queue Size shows 0 in metrics

Post by alt » Mon Nov 23, 2020 9:06 pm

vineet wrote:
Fri Nov 20, 2020 6:04 pm
please suggest a value for SendQueueLimit if normally batch submission is around 15k-25k to avoid ESME_RMSGQFUL. And shouldn't send speed limit should delay the message sending regardless how many are begin fed in queue.
You should find out by provider when he sends ESME_RMSGQFUL status and how many not processed requests are allowed to send.

It works this way:
- application submit a message
- library checks if SendQueueLimit is full and blocks your code for short time until there is a free slot in requests without response collection.
- library delays the code execution when application sends too fast for SendSpeedLimit.
- library places a request to the send queue.
- send queue thread sends serialized PDU to remote endpoint.
alt
Site Admin
Posts: 871
Joined: Tue Apr 25, 2006 9:45 am

Re: Queue Size shows 0 in metrics

Post by alt » Mon Nov 23, 2020 9:15 pm

vineet wrote:
Fri Nov 20, 2020 6:15 pm
The number of requests waiting for response you can read from metric: client.Metrics.Sent.Requests.WaitingForResponse i tried this it always shows 0 or 1. but my problem is i have submitted batch containing 50 messages.

IEnumerable<SubmitSmResp> ResponseList = (await SMPPClient.SubmitAsync(batch)).ToArray();

SubmitSpeed is set to 1 mps.
I think 1 mps is slow enough for remote side to process a request from your application.
Post Reply