Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-4543

QMF queueMoveMessages method returns "InvalidParameter" exception when there are simply no messages available to move from the source queue - this is confusing.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.18
    • Fix Version/s: 0.21
    • Component/s: C++ Broker
    • Labels:
      None
    • Environment:

      QMF

      Description

      QMF queueMoveMessages method returns "InvalidParameter" exception when there are simply no messages available to move from the source queue - this is confusing.

      Other queue management commands (such as purge and reroute on the queue object) don't object when there are no messages to move but queueMoveMessages barfs with InvalidParameter.

      This is inconsistent and it's pretty unhelpful, I spent about an hour checking over my code and looking through the broker code thinking I'd messed up the arguments. When I finally got round to actually adding some messages "just to see" it actually worked. Perhaps I should have tried that sooner, but as I say purge and reroute don't behave this way so it was fairly reasonable to assume I'd done something wrong...

      I personally think that queueMoveMessages should behave the same as purge and reroute and attempt to move whatever. It should only send back InvalidParameter if one of the parameters is actually invalid. It could be argued that trying to move zero messages is invalid, but a qty value of 0 means "all messages" and all of zero is zero.

        Attachments

          Activity

            People

            • Assignee:
              tedross Ted Ross
              Reporter:
              fadams Fraser Adams
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: