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

[Broker-J] Optimize fanout exchange routing functionality

    XMLWordPrintableJSON

    Details

      Description

      Whilst investigating a performance issue reported as part of QPID-8238 I ran a java profiler which had detected some performance loss on creation of intermediate map objects and copying data between intermediate maps in org.apache.qpid.server.exchange.TopicExchangeImpl#getMatchedDestinations and org.apache.qpid.server.exchange.topic.TopicExchangeResult#processMessage(org.apache.qpid.server.filter.Filterable).

      Effectively, the routing functionality converts the collection of TopicMatcherResult got based on message routing key into a map where keys are route destinations and values are routing/replacement keys. The conversions is done in TopicExchangeImpl#getMatchedDestinations using intermediate map returned from TopicExchangeResult#processMessage and containing the destination as a key and routing replacement key as a value. Than, multiple maps (representing each TopicMatcherResult ) are merged into a single map.

      I committed the changes [ https://git-wip-us.apache.org/repos/asf?p=qpid-broker-j.git;h=0510ed3 ] eliminating the need for intermediate map creation in TopicExchangeResult#processMessage. It also simplifies the code.

      The commit left the old implementation untouched but marked it as Deprecated in order to keep public methods unchanged as the next version is minor release rather major one.

      Following review comments from Keith Wall I created this JIRA to track exchange changes and reapply the commit 0510ed3

        Attachments

          Activity

            People

            • Assignee:
              orudyy Alex Rudyy
              Reporter:
              orudyy Alex Rudyy
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: