Notifier API does not support sending to specific exchange

Bug #1287291 reported by Mark McLoughlin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.messaging
Fix Released
Low
Unassigned

Bug Description

See https://review.openstack.org/70106

In the notify listener tests, we do:

        def mock_notifier_exchange(name):
            def side_effect(target, ctxt, message, version):
                target.exchange = name
                return transport._driver.send_notification(target, ctxt,
                                                           message, version)
            transport._send_notification = mock.MagicMock(
                side_effect=side_effect)

This highlights that we nave no ability to send notifications on a specific exchange

Is the answer here to add an exchange parameter to the Notifier constructor?

Mark McLoughlin (markmc)
Changed in oslo.messaging:
importance: Undecided → Low
status: New → Confirmed
Changed in oslo.messaging:
assignee: nobody → Hiroyasu OHYAMA (user-localhost2000)
Revision history for this message
PeterZhang (zhangshengping2012) wrote :

Hello, there.

we have defined the specific exchange in a Target object, do we?
and Notifier will accept this target object as a parameter.

so why we need let the Notifier to accept an exchange parameter again?

Revision history for this message
PeterZhang (zhangshengping2012) wrote :

my bad, I see the listener accept the target.

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/390510

Changed in oslo.messaging:
assignee: Hiroyasu OHYAMA (user-localhost2000) → PeterZhang (zhangshengping2012)
status: Confirmed → In Progress
Changed in oslo.messaging:
assignee: PeterZhang (zhangshengping2012) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on oslo.messaging (master)

Change abandoned by Ben Nemec (<email address hidden>) on branch: master
Review: https://review.openstack.org/390510
Reason: Okay, let's abandon for now then. It can always be restored if necessary.

Revision history for this message
Ben Nemec (bnemec) wrote :

I'm going to close this based on Ken's comments on https://review.openstack.org/#/c/390510/

"The exchange can be set indirectly via the set_transport_defaults method:

https://git.openstack.org/cgit/openstack/oslo.messaging/tree/oslo_messaging/transport.py#n71

It doesn't seem like folks are asking for anything beyond that. Unless there's a consumer for this feature I'd say abandon it."

Given the age of this bug, I'm going to close it as fixed and if someone needs more functionality they can open a new one.

Changed in oslo.messaging:
status: In Progress → 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.