client_evDeliverSm Fires Before SubmitAsync Is Completed

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

client_evDeliverSm Fires Before SubmitAsync Is Completed

Post by vineet » Thu Nov 19, 2020 11:12 am

Hi Alt,

the event client_evDeliverSm starts firing before the submitasync has given process all the messages.

IEnumerable<SubmitSmResp> ResponseList = (await SMPPClient.SubmitAsync(batch)).ToArray();
before ResponseList is populated with responses client_evDeliverSm starts firing this creates a problem on how to match delivery receipt with the messageid as the messageid is provided by the server and it before getting messageid delivery receipt is coming. please tell a solution.

thanks
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: client_evDeliverSm Fires Before SubmitAsync Is Completed

Post by alt » Thu Nov 19, 2020 6:07 pm

Hi vineet,

It is normal case. SMPP is asynchronous protocol. When you cannot find MessageId in sent messages, you need to save received delivery receipts in some collection/dictionary and process it when you finish with batch sending.
vineet
Posts: 28
Joined: Sat May 06, 2017 7:06 pm

Re: client_evDeliverSm Fires Before SubmitAsync Is Completed

Post by vineet » Thu Nov 19, 2020 6:52 pm

Thanks alt we have done the same way implemented dictionary.
Post Reply