messageComposer and messages with ReferenceNumber is 0

Post Reply
developerlearn999
Posts: 85
Joined: Thu Jun 20, 2019 9:34 am

messageComposer and messages with ReferenceNumber is 0

Post by developerlearn999 » Tue Dec 03, 2019 12:33 pm

i am using an inetlab tester.
the messages are with ReferenceNumber ==0 (se picture)

Image
how does the composer concat the correct parts in this case?

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

Re: messageComposer and messages with ReferenceNumber is 0

Post by alt » Wed Dec 04, 2019 3:42 pm

For MessageComposer ReferenceNumber=0 is same value as any other. It tries to combine the parts with ReferenceNumber =0. It is important that at the same time there is no anther concatenated message with 0 reference number. If it happen,
you could get a message text out of mixed parts from two messages or in worst case an IndexOutOfRangeException.

Therefore, you need to use Create(SmppClientBase) method when you create SMS parts with SMS.ForSubmit builder. It sets next reference number from client.SequenceGenerator for all parts.

If you use Create(EncodingMapper) method instead, ReferenceNumber keeps 0 value.

I hope I have understood your question, if not please provide more information about the issue.
developerlearn999
Posts: 85
Joined: Thu Jun 20, 2019 9:34 am

Re: messageComposer and messages with ReferenceNumber is 0

Post by developerlearn999 » Thu Dec 05, 2019 9:47 am

Thanks its more clear now
developerlearn999
Posts: 85
Joined: Thu Jun 20, 2019 9:34 am

Re: messageComposer and messages with ReferenceNumber is 0

Post by developerlearn999 » Thu Feb 20, 2020 2:21 pm

i tried to do :

Code: Select all

 _client.Submit(builder.Create(EncodingMapper.Default));
but still the Refernece number is 0
should i do something else too?
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: messageComposer and messages with ReferenceNumber is 0

Post by alt » Thu Feb 20, 2020 5:11 pm

did you try:

Code: Select all

var parts = builder.Create(_client);
or

Code: Select all

 _client.Submit(builder);
developerlearn999
Posts: 85
Joined: Thu Jun 20, 2019 9:34 am

Re: messageComposer and messages with ReferenceNumber is 0

Post by developerlearn999 » Mon Feb 24, 2020 10:06 am

i tried

Code: Select all

var parts = builder.Create(_client);
IList<SubmitSmResp> resp = await _client.Submit(builder);
but still the Reference on the server side is 0
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: messageComposer and messages with ReferenceNumber is 0

Post by alt » Mon Feb 24, 2020 6:39 pm

I cannot reproduce your case.
Could you send me library log in Verbose log level? https://docs.inetlab.com/smpp/v2/articles/tracing.html
I need to check what data library sends from your application.
Post Reply