AMQP 1.0 Change functional test to avoid sharing transports

Bug #1421397 reported by Ken Giusti
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.messaging
Fix Released
Undecided
Ken Giusti

Bug Description

Two of the driver functional tests do not pass when run against the AMQP 1.0 driver:

CallTestCase.test_server_in_group
CallTestCase.test_different_exchanges

Both of these tests create multiple RPC servers subscribed to the same target. The tests verify that, if multiple RPC requests are sent to that target, the requests are distributed across all servers.

This fails for the amqp1 driver - in this case, all RPC requests are sent to one of the servers rather than distributed across all the servers.

I've looked into this a bit - the reason this happens is that servers are all using the same instance of a transport object. This means that, in the case of the amqp1 driver (which pools connections), only one connection is created to the broker for all servers (since all servers are using the same url).

Contrast this to the qpid driver - that driver creates a new connection for every subscription, which results in multiple connections from the single transport: one for each server.

The qpidd broker will try to evenly distribute messages across competing consumers, but _only_ at the connection level. qpidd does not distribute messages across consumers that share the same connection. I've got a bug opened against this upstream (https://issues.apache.org/jira/browse/QPID-6307), but since qpidd never provided that capability, it may be awhile before it is addressed.

I suspect that it is unlikely that there will be a case where multiple servers from within the same process - that is, sharing the same transport object - will subscribe to the same target (correct me if I'm wrong). If that is the case, then the most common use case will have each server create its own transport. I propose we modify the functional tests to adopt this behavior.

On the other hand, I could modify the amqp1 driver to avoid connection pooling, but I don't see a real valid reason for doing so (if my assumption re: sharing transports is correct).

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.messaging (master)

Fix proposed to branch: master
Review: https://review.openstack.org/155476

Changed in oslo.messaging:
assignee: nobody → Ken Giusti (kgiusti)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.messaging (master)

Reviewed: https://review.openstack.org/155476
Committed: https://git.openstack.org/cgit/openstack/oslo.messaging/commit/?id=3f967effe2c4aa8230e12204f147c78b17d8155f
Submitter: Jenkins
Branch: master

commit 3f967effe2c4aa8230e12204f147c78b17d8155f
Author: Kenneth Giusti <email address hidden>
Date: Thu Feb 12 15:35:12 2015 -0500

    Create a unique transport for each server in the functional tests

    Change-Id: I77a3670b3bdd3a4697b5a8b559936220cdba41ae
    Closes-bug: #1421397

Changed in oslo.messaging:
status: In Progress → Fix Committed
Changed in oslo.messaging:
milestone: none → 1.8.1
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
milestone: 1.8.1 → next-liberty
Changed in oslo.messaging:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.