Qpid
  1. Qpid
  2. QPID-2442

make TemporaryQueue.delete perform the delete on the broker

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: M2, M2.1, M3, M4, 0.5, 0.6, 0.8, 0.10, 0.12
    • Fix Version/s: 0.13
    • Component/s: Java Client
    • Labels:
      None

      Description

      Session.createTemporaryQueue() actualy contacts the broker to create the queue before returning the temporaryQueue object, however TemporaryQueue.delete simply marks the object as deleted locally. This should be enhanced to delete the queue on the broker.

        Issue Links

          Activity

          Hide
          Keith Wall added a comment -

          This patch changes the Java Client to actually cause the deletion of the temporary queue (or temporary topic) on the Broker when the client application calls TemporaryQueue#delete or (TemporaryTopic#delete), rather than merely marking as so in the client.

          The changes affects the 0-10 code path only. 0-8..0-9-1 behaviour is unchanged.

          Bolstered the system tests around tmp queues/topics.

          Show
          Keith Wall added a comment - This patch changes the Java Client to actually cause the deletion of the temporary queue (or temporary topic) on the Broker when the client application calls TemporaryQueue#delete or (TemporaryTopic#delete), rather than merely marking as so in the client. The changes affects the 0-10 code path only. 0-8..0-9-1 behaviour is unchanged. Bolstered the system tests around tmp queues/topics.
          Hide
          Keith Wall added a comment -

          Hi Robbie Could you take a look at this patch please?

          Show
          Keith Wall added a comment - Hi Robbie Could you take a look at this patch please?
          Hide
          Robbie Gemmell added a comment -

          The actual change look reasonable to me, just have a couple nit-picks with the tests:

          The failure messages in testUseFromAnotherSessionProhibited() hasnt been updated, so it is still talking about queue deletion:

                       fail("Expected JMSException : should not be able to delete while there are active consumers");
          

          In testExplictTemporaryQueueDeletion() it would be good if the 2nd (successful) attempt deletion was verified to have had the desired effect on the broker, eg something like casting to an AMQSession and checking if the queue is still bound to an expected exchange (or for the Java broker, it could use JMX to check the queue MBean goes away).

          Show
          Robbie Gemmell added a comment - The actual change look reasonable to me, just have a couple nit-picks with the tests: The failure messages in testUseFromAnotherSessionProhibited() hasnt been updated, so it is still talking about queue deletion: fail("Expected JMSException : should not be able to delete while there are active consumers"); In testExplictTemporaryQueueDeletion() it would be good if the 2nd (successful) attempt deletion was verified to have had the desired effect on the broker, eg something like casting to an AMQSession and checking if the queue is still bound to an expected exchange (or for the Java broker, it could use JMX to check the queue MBean goes away).
          Hide
          Keith Wall added a comment -

          Hi Robbie, Now committed with your suggested changes.
          cheers, Keith.

          Show
          Keith Wall added a comment - Hi Robbie, Now committed with your suggested changes. cheers, Keith.
          Hide
          Robbie Gemmell added a comment -

          Changes seem reasonable to me, resolving.

          Show
          Robbie Gemmell added a comment - Changes seem reasonable to me, resolving.

            People

            • Assignee:
              Keith Wall
              Reporter:
              Robbie Gemmell
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development