Qpid
  1. Qpid
  2. QPID-2614

QueueConfiguration requires to configurations to be provided on construction

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.6
    • Fix Version/s: 0.7
    • Component/s: Java Broker
    • Labels:
      None

      Description

      QueueConfiguration currently is requried to take two Configurations.

      • One Commons Configuration which is the munged configuration of queues and the queue elements
      • One VirtualHostConfiguration to use as the default values.

      This makes the QueueConfiguration fragile to changes in our configuration model.

      If the QueueConfiguration requres a munged configuration based on the virtualhost configuration then it should retreive the configuration and munged it locally.

      This approach of requiring a munged configuration to be provided at construction time. This poses a problem when using plugins that require queue configuration.

      If the queue is defined in the virtualhost xml then the VirtualHostConfiguration will create a munged config and provide that to the QueueConfiguration.

      If the queue is declared dynamically then only the virtualhost default values will be used. This is fine for alerting which is hard coded but a plugin that needs the queue configuration will not have any configuration to process.

      The right thing to do here is to make the QueueConfiguration perform the munging based on how it wants to munge it based on the VirtualHostConfiguration.

      Changes requried:
      Update constructor signature to only take name and VirtualHostConfiguration then perform local munging.
      Update tests to correctly create a VHConfig for testing.
      Update QueueConfiguration new instance calls to use two parameters.. Only one additional core broker usage in VHC.getQueueConfig... it passes null as the MungedConfig.. hence the problems.

        Activity

        Martin Ritchie created issue -
        Martin Ritchie made changes -
        Field Original Value New Value
        Status Open [ 1 ] In Progress [ 3 ]
        Robbie Gemmell made changes -
        Status In Progress [ 3 ] Ready To Review [ 10006 ]
        Hide
        Marnie McCormack added a comment -

        Reviewed changes made ok.

        Config code loks way more handcrafted that it should be though, we should clean it up so we're not hand parsing the XML in a bespoke fashion to find elements correctly. But we know that ..

        Show
        Marnie McCormack added a comment - Reviewed changes made ok. Config code loks way more handcrafted that it should be though, we should clean it up so we're not hand parsing the XML in a bespoke fashion to find elements correctly. But we know that ..
        Marnie McCormack made changes -
        Status Ready To Review [ 10006 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Rob Godfrey made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Martin Ritchie
            Reporter:
            Martin Ritchie
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development