Implementing IComposerItemStore Obsolete Methods

Post Reply
ryszard.sikora
Posts: 1
Joined: Fri Apr 10, 2020 9:30 am

Implementing IComposerItemStore Obsolete Methods

Post by ryszard.sikora » Fri Apr 10, 2020 9:35 am

Hello

I'd like to implement IComposerItemStore using redis. I can see in the docs that the methods Clear() and GetAll() are deprecated. Does it mean I don't need to implement them in custom ComposerItemStore? (just throw NotImplementedException)

Moreover, I'd like to know whether I need to handle timeout. MessageComposer docs say the messages parts expire after 60 seconds.

And last thing - an alternative scenario, where I handle storing message parts myself (outside MessageComposer). In this case is there any disadvantage of creating MessageComposer instance per DeliverSm? And the method IsLastSegment() - will it return true for the last segment if it's the only segment added to MessageComposer instance or do I need to add all segments and only then IsLastSegment returns true?

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

Re: Implementing IComposerItemStore Obsolete Methods

Post by alt » Thu Apr 16, 2020 7:47 am

MessageComposer class has also deprecated Clear method and Items property. The idea is that user can get all items and clear them from own implementation of IComposerItemStore.

MessageComposer raises evFullMessageTimeout event when not all segments/parts were received during some time. Time is counted from the moment of last received part.

You should create MessageComposer per SMPP client. IsLastSegment returns true when MessageComposer finds all parts for concatenation message or when message consist of one part and has no concatenation parameters.

The same works for evFullMessageReceived event. It will be raised when all message parts are received or when you AddMessage without concatenation parameters.
Post Reply