-
Task
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
False
-
False
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Removing message_bus as it is not used anymore in the UI anyway.
It makes processing the `zync queue` in System slow, as it is always waiting for message bus while there is no message bus involved.
Why we needed MessageBus?
In order to show in the UI the update in realtime the Zync integration, we needed a way to communicate with Zync and Sidekiq
As everything is done asynchronously, showing in the updates was done through message bus communication.
Why are we removing it:
- The code is hard to understand, to maintain and to debug, many hacks here and there, see for example https://github.com/3scale/porta/commit/444e28aa68c4a13cb92628eac2af0e9d704505d5
- We already disabled it in the UI long time ago https://github.com/3scale/porta/commit/9da51ed20f2fb7db4396c71459d3bf6c739bc039
- We have issues with timeout when the update did not come from the UI: https://issues.redhat.com/issues/?jql=text%20~%20%22messageBus%22%20and%20project%20%3D%20THREESCALE
- why keeping a code we are not using?
This ticket is about to remove the MessageBus part in Zync and in System.
The System part is already in progress https://github.com/3scale/porta/pull/2687
Dev Notes
It is disabled for really long time, and is hard to understand.
- issue with process getting terminated randomly
{{ Global messages on 12355 timed out, restarting process
13884 successfully terminated by `TERM` signal.}} * UI was already removed when migrating to React Patternfly
- Zync queues were waiting for nothing and it was raising a MessageBusTimeout
- it is not used, and disabling it make it timeout somehow
Steps to reproduce with current HEAD
- Use production environment
- disable message bus in config/zync.yml and config/message_bus.yml
- launch a rails server and wait a little bit more than 3 minutes
- see your rails server terminated with a message like the one above
Explanation:
- When disabling in the config we only disable the message bus client not the server. The message bus server is still waiting for some messages. See https://github.com/discourse/message_bus/blob/v2.0.9/lib/message_bus.rb#L473-L506
- Despite this config 444e28a there is no ping to the server, thus after the 3' mark MessageBus will restart the process.