Closed telekosmos closed 7 years ago
The short answer is that this isn't supported. Once the timeToLive has been set it is not meant to be changed.
I think your best solution might be deferring creation of the Message object until you know what the TTL should be.
All of this should be easier to deal with once v1 comes around. Unfortunately I don't know when that will be.
Thanks for the quick and concise reply.
We are using a legacy version (actually 0.11.1 :-S) and, diving in the code, we found that in that versions the params of the object can be updated by using message.params
property. We are trying just set the TTL by message.params.timeToLive=TTL
and seems to be working.
Anyway, we will seriously consider delaying the object creation. Cheers again!!!
No problem and good luck :smile:
Hi there We'd like to set
timeToLive
param in theMessage
object just depending on another param (conditionally). In the Usage section, how to configure the Message object on creation is described, but not how to configure the object later if the object is created without any param.Digging in the code we've found methods
addParam
,setParam
forMessage
class, but we are confused by theparamType
.May someone to provide some example on how to use it/them???
Cheers!!!