8 Replies Latest reply on Nov 8, 2011 6:21 PM by jiayi_gu

    Reliable messaging - viewing the pending queue

    betheflexcoder Level 2

      Hi,

       

      I have applied reliable messaging concept with data service and rtmp channel. When I send a request during network disconnection, reliable messaging takes care to send the request once the network is resumed.  I want to know, if I can be able to view the pending messages in the queue after network resumes, so that I can do some operation like fill() after the pending messages are sent to the server. Menaing, I want to get notification when the pending messages are sent to the server after network resumes and do some operation after that. I also want to know how many requests are pending after the network resumes. Are there any events to capture this information?

       

      Hoping to solve this problem with the forum's help.

       

       

      Thanks,

      betheflexcoder

        • 1. Re: Reliable messaging - viewing the pending queue
          Mike Peterson Level 1

          Reliable message does its own queuing and resending under the covers. You should not need to do a fill operation after a transient disconnect; reliable messaging takes care of resending messages if needed.

          • 2. Re: Reliable messaging - viewing the pending queue
            jiayi_gu

            Hi Mike,

             

            Is there a way we can know the size and the status (sent, about to send... ) of the pending queue? We need this information to coordinate other tasks that we have in the client.

             

            Thanks,

            Jiayi

            • 3. Re: Reliable messaging - viewing the pending queue
              Mike Peterson Level 1

              I do not believe you can do that with reliable messaging. You may be able to use a custom queue processor in combination with reliable messaging though. Have you looked into that yet in the doc?

              • 4. Re: Reliable messaging - viewing the pending queue
                Alex Glosband Adobe Employee

                A custom queue processor would give you access to the messages that have been queued for the client on the server. This is at a layer or level above the reliable messaging queue. Reliable messaging is supposed to be transparent to the user so we don't allow messages or queues to be manipulated once they've been flushed to this layer or level.

                 

                I don't think there really is the concept of a message queue on the client butI don't think it would be too hard to implement something like this yourself. You'd just need to keep track of messages that had been sent for which you hadn't received replies yet. Those would be your pending messages. When you received a reply back to a message that was sent, you'd remove it from the list.

                 

                -Alex

                • 5. Re: Reliable messaging - viewing the pending queue
                  betheflexcoder Level 2

                  Thanks Mike. I will look into how I can combine reliable messaging with custom queue processor.

                  • 6. Re: Reliable messaging - viewing the pending queue
                    betheflexcoder Level 2

                    Alex,

                     

                    I am using reliable messaging with data services and it does a good job to reconnect and send pending requests on a transient network disconnect. I also understand that the custom queue processor gives access to messages queued from server to client. Are you sure that the reliable messaging queue is at a layer below the flex client outbound queue? I need to do some operation when the pending messages are sent to the server when the network resumes and do some operation after that. I can track messages which did not recieve response from, but my problem is to do some operation when there are no messages in the queue too. Do you know how to do it?

                     

                    I believe the reliable messaging uses the existing default queue to keep track of messages and it should use the custom queue if defined. Any thoughts?

                    • 7. Re: Reliable messaging - viewing the pending queue
                      betheflexcoder Level 2

                      Hi Mike,

                       

                      After looking into the custom queue processor in the documentation, I understand that it gives control over the queue from server to each client. But do we have any means for the Flex client application to know the size of the pending requests? I can capture the response for the pending request after the network is connected and do some other operation in the response handler. But still, I need to know if the queue is empty and there is a case where it does not go to the result handler. Can we know when the client application starts sending the pending requests?

                       

                       

                      Thanks,

                      betheflexcoder

                      • 8. Re: Reliable messaging - viewing the pending queue
                        jiayi_gu Level 1

                        Hi Alex,

                         

                        Does the client can have a peek of the reliable messaging size? The size info will be very crucial for the client to coordinate other tasks that have to proceed AFTER reliable messaging finishes.

                         

                        Thanks,

                        Jiayi