Qpid
  1. Qpid
  2. QPID-3790

Add a new method getQueueDepth(AMQDestionation, boolean) into AMQSession to allow syncing the session before sending QueueQuery command

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.15
    • Fix Version/s: 0.15
    • Component/s: Java Client
    • Labels:
      None

      Description

      The number of existing tests fails sporadically in DUPS_OK mode by relying on fact that method AMQSession.getQueueDepth(AMQDestionation) returns the correct result.

      In case of DUPS_OK, a message acknowledgment can be sent as part AMQSession.getQueueDepth(AMQDestionation) before sending QueueQuery command.
      Currently session does not sync between sending acknowledgments(MessageAccept) and QueueQuery commands.

      As result of it QueueQuery command results can be returned before MessageAccept is processed on the broker. In this case QueueQuery results might contain incorrect messageCount value.

        Activity

        Alex Rudyy created issue -
        Alex Rudyy made changes -
        Field Original Value New Value
        Summary Add a new method getQueueDepth(AMQDestionation, boolean) into AMQSession to allow sync message acknowledgment before sending QueueQuery command Add a new method getQueueDepth(AMQDestionation, boolean) into AMQSession to allow syncing the session before sending QueueQuery command
        Alex Rudyy made changes -
        Assignee Alex Rudyy [ alex.rufous ]
        Alex Rudyy made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Alex Rudyy added a comment -

        Added a patch with an enhancement

        Show
        Alex Rudyy added a comment - Added a patch with an enhancement
        Alex Rudyy made changes -
        Attachment 0001-QPID-3790-Add-a-method-AMQSession.getQueueDepth-AMQD.patch [ 12512577 ]
        Alex Rudyy made changes -
        Status In Progress [ 3 ] Ready To Review [ 10006 ]
        Hide
        Alex Rudyy added a comment -

        Robbie,

        Could you please review and commit the suggested enhancement?

        Show
        Alex Rudyy added a comment - Robbie, Could you please review and commit the suggested enhancement?
        Alex Rudyy made changes -
        Assignee Alex Rudyy [ alex.rufous ] Robbie Gemmell [ gemmellr ]
        Hide
        Robbie Gemmell added a comment -

        Change itself looks fine, but I would use QpidTestCase to tidy up the system property manipulation.

        Show
        Robbie Gemmell added a comment - Change itself looks fine, but I would use QpidTestCase to tidy up the system property manipulation.
        Robbie Gemmell made changes -
        Status Ready To Review [ 10006 ] Open [ 1 ]
        Assignee Robbie Gemmell [ gemmellr ] Alex Rudyy [ alex.rufous ]
        Alex Rudyy made changes -
        Attachment 0001-QPID-3790-Add-a-method-AMQSession.getQueueDepth-AMQD.patch [ 12512577 ]
        Alex Rudyy made changes -
        Attachment 0001-QPID-3784-Introduce-JVM-env-variable-to-run-a-dispat.patch [ 12512750 ]
        Alex Rudyy made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Alex Rudyy made changes -
        Status In Progress [ 3 ] Ready To Review [ 10006 ]
        Hide
        Alex Rudyy added a comment -

        Robbie,

        I changed AMQSession_0_10Test which extends QpidTestCase now and uploaded a new patch

        Could you please commit it?

        Show
        Alex Rudyy added a comment - Robbie, I changed AMQSession_0_10Test which extends QpidTestCase now and uploaded a new patch Could you please commit it?
        Alex Rudyy made changes -
        Assignee Alex Rudyy [ alex.rufous ] Robbie Gemmell [ gemmellr ]
        Alex Rudyy made changes -
        Attachment 0001-QPID-3784-Introduce-JVM-env-variable-to-run-a-dispat.patch [ 12512750 ]
        Alex Rudyy made changes -
        Hide
        Robbie Gemmell added a comment -

        Patch applied.

        Show
        Robbie Gemmell added a comment - Patch applied.
        Robbie Gemmell made changes -
        Status Ready To Review [ 10006 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Reviewable Reviewable Open Open
        21h 26m 1 Robbie Gemmell 01/Feb/12 12:38
        Open Open In Progress In Progress
        4h 13m 2 Alex Rudyy 01/Feb/12 13:25
        In Progress In Progress Reviewable Reviewable
        1m 33s 2 Alex Rudyy 01/Feb/12 13:25
        Reviewable Reviewable Resolved Resolved
        1h 54m 1 Robbie Gemmell 01/Feb/12 15:20

          People

          • Assignee:
            Robbie Gemmell
            Reporter:
            Alex Rudyy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development