)]}'
{"oslo_messaging/rpc/server.py":[{"author":{"_account_id":13290,"name":"Oleksii Zamiatin","email":"ozamiatin@mirantis.com","username":"ozamiatin"},"change_message_id":"dd4fbf23df72178b916b3e3064a7ef5385abdeed","unresolved":false,"context_lines":[{"line_number":158,"context_line":""},{"line_number":159,"context_line":"def get_rpc_server(transport, target, endpoints,"},{"line_number":160,"context_line":"                   executor\u003d\u0027blocking\u0027, serializer\u003dNone,"},{"line_number":161,"context_line":"                   dispatcher_cls\u003dNone):"},{"line_number":162,"context_line":"    \"\"\"Construct an RPC server."},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    The executor parameter controls how incoming messages will be received and"}],"source_content_type":"text/x-python","patch_set":3,"id":"dab17558_cd7f6aa9","line":161,"updated":"2016-05-11 00:40:05.000000000","message":"This change means we give the possibility to provide any custom dispatcher outside oslo.messaging. I agree this gives more flexibility, but isn\u0027t dispatcher supposed to be an internal stuff and live inside oslo.messaging like executor? Wouldn\u0027t this give us some backwards compat problems in future when some custom dispatchers will die after some changes? Probably if we need some other dispatcher (like ack after processing) we could implement it and support it inside oslo messaging and switch between implementations via config like we do with drivers, matchmakers and other stuff.\n\nFor example to specify executor we pass a name (one of the existing impls) instead of passing the class itself.","commit_id":"3e11c1cfc74b83906118a5e32d753492ccd9b66f"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"5000c883dff45304f0d0c54b672942e464e26140","unresolved":false,"context_lines":[{"line_number":158,"context_line":""},{"line_number":159,"context_line":"def get_rpc_server(transport, target, endpoints,"},{"line_number":160,"context_line":"                   executor\u003d\u0027blocking\u0027, serializer\u003dNone,"},{"line_number":161,"context_line":"                   dispatcher_cls\u003dNone):"},{"line_number":162,"context_line":"    \"\"\"Construct an RPC server."},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    The executor parameter controls how incoming messages will be received and"}],"source_content_type":"text/x-python","patch_set":3,"id":"dab17558_a5e031ce","line":161,"in_reply_to":"dab17558_39ae3881","updated":"2016-05-11 09:06:38.000000000","message":"Others have already implemented custom dispatchers, in Designates case, this is for handling \"expected exceptions\", basically wrapping the dispatch() method[1]. Mistral\u0027s is a little more involved, being a pre vs post ack thing[2]. Barbican\u0027s, while not a custom dispatcher per-se, is using a different than default dispatcher with the (now) RPCServer class[3].\n\nAllowing some or all of the Dispatcher class to be a API consumers of o.m can extend makes a bunch of sense to me, for example, say Designate wanted to start tracking all RPC calls with StatsD, the Dispatcher class is an obvious place to put this, but baking StatsD (or Ceilometer etc) right into oslo.messaging feels wrong..\n\nNot being able to pass this dispatcher cls into this method means we just reimplement this entire method, which caused bug 1580139 when 5.0.0 was released, as the 3 projects didn\u0027t have this helper method to hide the underlying API changes. \n\n[1]: https://github.com/openstack/designate/blob/master/designate/rpc.py#L178\n[2]: https://github.com/openstack/mistral/blob/master/mistral/engine/rpc.py#L49\n[3]: http://git.openstack.org/cgit/openstack/barbican/tree/barbican/queue/__init__.py#n98","commit_id":"3e11c1cfc74b83906118a5e32d753492ccd9b66f"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"362dae8cbed6c1a6e52e3af89d4b53a6cc202074","unresolved":false,"context_lines":[{"line_number":158,"context_line":""},{"line_number":159,"context_line":"def get_rpc_server(transport, target, endpoints,"},{"line_number":160,"context_line":"                   executor\u003d\u0027blocking\u0027, serializer\u003dNone,"},{"line_number":161,"context_line":"                   dispatcher_cls\u003dNone):"},{"line_number":162,"context_line":"    \"\"\"Construct an RPC server."},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    The executor parameter controls how incoming messages will be received and"}],"source_content_type":"text/x-python","patch_set":3,"id":"dab17558_39ae3881","line":161,"in_reply_to":"dab17558_cd7f6aa9","updated":"2016-05-11 03:03:08.000000000","message":"agree, we need dispatchers inside oslo.messaging. The dispatcher implemented by user may be useful for other users. We don\u0027t want others to reinvent one.","commit_id":"3e11c1cfc74b83906118a5e32d753492ccd9b66f"}],"oslo_messaging/tests/rpc/test_server.py":[{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"362dae8cbed6c1a6e52e3af89d4b53a6cc202074","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        target \u003d oslo_messaging.Target(server\u003d\u0027testserver\u0027)"},{"line_number":237,"context_line":"        self.assertRaises(TypeError, oslo_messaging.get_rpc_server,"},{"line_number":238,"context_line":"                          transport, target, [],"},{"line_number":239,"context_line":"                          dispatcher_cls\u003dunicode)"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    def test_unknown_executor(self):"},{"line_number":242,"context_line":"        transport \u003d oslo_messaging.get_transport(self.conf, url\u003d\u0027fake:\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"dab17558_5925fc06","line":239,"range":{"start_line":239,"start_character":48,"end_line":239,"end_character":49},"updated":"2016-05-11 03:03:08.000000000","message":"Traceback (most recent call last):\n  File \"/home/jenkins/workspace/gate-oslo.messaging-python34/oslo_messaging/tests/rpc/test_server.py\", line 239, in test_invalid_dispatcher\n    dispatcher_cls\u003dunicode)\nNameError: name \u0027unicode\u0027 is not defined","commit_id":"3e11c1cfc74b83906118a5e32d753492ccd9b66f"}]}
