ckrey / MQTTChat

Demonstration iOS App for MQTT-Client-Framework
Eclipse Public License 1.0
96 stars 30 forks source link

About pending messages and local storage capacity. #5

Closed Nautiyalsachin closed 7 years ago

Nautiyalsachin commented 7 years ago

I am using session manager now, Thank you for your suggestion, as I implemented it fully, I am getting some issues here with that, Like

  1. I am unable to send the messages, I am able to get the messages of checkDup but still not able to send any message, its getting stored and I can see the message count increasing.

  2. Its only storing 10 - 12 msgs, after creating the session again.

Edit:

I am getting flow as nil because maxSize = 64 and maxMessages = 1024 it might helps but I can't able to understand still why this causing the failure to the sending message.

in this method :-

- (MQTTCoreDataFlow *)storeMessageForClientId:(NSString *)clientId
                                    topic:(NSString *)topic
                                     data:(NSData *)data
                               retainFlag:(BOOL)retainFlag
                                      qos:(MQTTQosLevel)qos
                                    msgId:(UInt16)msgId
                             incomingFlag:(BOOL)incomingFlag
                              commandType:(UInt8)commandType
                                 deadline:(NSDate *)deadline {
if (([self allFlowsforClientId:clientId incomingFlag:incomingFlag].count <= self.maxMessages) &&
    (fileSize <= self.maxSize)) {

Thanks in advance.

ckrey commented 7 years ago

As MQTTChat is only a demonstration iOS App for MQTT-Client-Framework

For all documentation, issues, etc. please refer to the MQTT-Client-Framework