client.SubmitAsync vs client.Submit
client.SubmitAsync vs client.Submit
Dears,
I am using client.Submit to submit my msgs with single part only and client.Submit for multipart msgs ...
however the performance of client.Submit is very low compared with client.SubmitAsync
is there any way to increase it ?
can i use client.SubmitAsync to send multiparts ?
I am using client.Submit to submit my msgs with single part only and client.Submit for multipart msgs ...
however the performance of client.Submit is very low compared with client.SubmitAsync
is there any way to increase it ?
can i use client.SubmitAsync to send multiparts ?
Re: client.SubmitAsync vs client.Submit
Hello ali513,
Submit method sends PDU, waits for response and returns it to the application.
SubmitAsync also sends PDU asynchronously. Response you can receive only with the event evSubmitComplete.
Yes, you can use SubmitAsync to send multiparts. In this case event handler of the event evSubmitComplete will be executed several times.
Regards,
Alexey
Submit method sends PDU, waits for response and returns it to the application.
SubmitAsync also sends PDU asynchronously. Response you can receive only with the event evSubmitComplete.
Yes, you can use SubmitAsync to send multiparts. In this case event handler of the event evSubmitComplete will be executed several times.
Regards,
Alexey
Re: client.SubmitAsync vs client.Submit
Thanks for reply ,,
but sometimes when i used this service i got the response as :
[Reference: 1, Total: 2, Sequence: 2]
[Reference:1 , Total: 2, Sequence: 2]
both parts has same sequence !! .. any idea ? is the problem from smpp server demo app ?
my send code is
but sometimes when i used this service i got the response as :
[Reference: 1, Total: 2, Sequence: 2]
[Reference:1 , Total: 2, Sequence: 2]
both parts has same sequence !! .. any idea ? is the problem from smpp server demo app ?
my send code is
Code: Select all
ISubmitSmBuilder builder = SMS.ForSubmit().Text(message.MessageData).To(message.DestinationAddress).From(message.SourceAddress).Coding(Utils.ParseDataCodings(message.DataCoding)).DeliveryReceipt().Set(delegate(SubmitSm sm)
{
sm.Sequence = squenceNumber;
sm.RegisteredDelivery = (byte)shouldRequestDLr;
});
this.client.SubmitAsync(builder);
Re: client.SubmitAsync vs client.Submit
and here is the smpp server log :
10:43:59: DEBUG: 7: (SmppServerClient) Sending PDU: SubmitSmResp, Length: 16, Status: ESME_ROK, Sequence: 1, MessageId: c8b06f21-b717-4401-b021-e19277e541fa
10:43:59: TRACE: 7: (hRsPwpE8SrLKTVd6UY) Socket #6044116: Sending data: 0000003580000004000000000000000163386230366632312d623731372d343430312d623032312d65313932373765353431666100
10:43:59: DEBUG: 7: (SmppServerClient) Sending PDU: SubmitSmResp, Length: 16, Status: ESME_ROK, Sequence: 1, MessageId: bd383e3a-a3fa-488d-aaac-f3d1d4903e1b
10:43:59: TRACE: 7: (hRsPwpE8SrLKTVd6UY) Socket #6044116: Sending data: 0000003580000004000000000000000162643338336533612d613366612d343838642d616161632d66336431643439303365316200
10:43:59: DEBUG: 7: (SmppServerClient) Sending PDU: SubmitSmResp, Length: 16, Status: ESME_ROK, Sequence: 1, MessageId: c8b06f21-b717-4401-b021-e19277e541fa
10:43:59: TRACE: 7: (hRsPwpE8SrLKTVd6UY) Socket #6044116: Sending data: 0000003580000004000000000000000163386230366632312d623731372d343430312d623032312d65313932373765353431666100
10:43:59: DEBUG: 7: (SmppServerClient) Sending PDU: SubmitSmResp, Length: 16, Status: ESME_ROK, Sequence: 1, MessageId: bd383e3a-a3fa-488d-aaac-f3d1d4903e1b
10:43:59: TRACE: 7: (hRsPwpE8SrLKTVd6UY) Socket #6044116: Sending data: 0000003580000004000000000000000162643338336533612d613366612d343838642d616161632d66336431643439303365316200
Re: client.SubmitAsync vs client.Submit
You should assign different sequenceNumber for each SubmitSm PDU. Sending two SubmitSm with the same sequence_number during one SMPP session (between Bind and Unbind)
is violating SMPP protocol.
is violating SMPP protocol.
Re: client.SubmitAsync vs client.Submit
already assign ... however if i send a msg with 2 parts ..
the 2 parts will have same sequence
the 2 parts will have same sequence
Re: client.SubmitAsync vs client.Submit
you should fix it. each concatenated PDU must have its own sequence number.
Re: client.SubmitAsync vs client.Submit
how can we do this
because i used ISubmitSmBuilder code:
==============
ISubmitSmBuilder builder = SMS.ForSubmit().Text(message.MessageData).To(message.DestinationAddress).From(message.SourceAddress).Coding(Utils.ParseDataCodings(message.DataCoding)).DeliveryReceipt().Set(delegate(SubmitSm sm)
{
sm.Sequence = squenceNumber;
sm.RegisteredDelivery = (byte)shouldRequestDLr;
});
=========
do /I need to silt the message manually ?
because i used ISubmitSmBuilder code:
==============
ISubmitSmBuilder builder = SMS.ForSubmit().Text(message.MessageData).To(message.DestinationAddress).From(message.SourceAddress).Coding(Utils.ParseDataCodings(message.DataCoding)).DeliveryReceipt().Set(delegate(SubmitSm sm)
{
sm.Sequence = squenceNumber;
sm.RegisteredDelivery = (byte)shouldRequestDLr;
});
=========
do /I need to silt the message manually ?
Re: client.SubmitAsync vs client.Submit
how can i manage database in Async method
when i use sequence number then problem Getting in multy part message
how can i manage please suggest me
when i use sequence number then problem Getting in multy part message
how can i manage please suggest me
Re: client.SubmitAsync vs client.Submit
Don't generate Sequence numbers your self. Let library to do it.
smppSessionId is any global unique id that should be recreated for a SmppClient on every bind to SMSC. It avoids a problem with duplicated sequence numbers when you need to find message.Id by sequence_number in your database in evSubmitComplete event handler.
Code: Select all
IList<SubmitSm> list = Inetlab.SMPP.SMS.ForSubmit()
.Text(message.message)
.From(message.sender)
.To(message.number)
.ExpireIn(TimeSpan.FromHours(message.expiry))
.DeliveryReceipt()
.Create(_client);
foreach (SubmitSm sm in list)
{
sm.Sequence = _client.SequenceGenerator.NextSequenceNumber();
SaveSequenceToDatabase(message.Id, sm.Sequence, smppSessionId);
}
_client.SubmitAsync(list);
smppSessionId is any global unique id that should be recreated for a SmppClient on every bind to SMSC. It avoids a problem with duplicated sequence numbers when you need to find message.Id by sequence_number in your database in evSubmitComplete event handler.