DEV: Update message_bus to 4.0.0 (#15553)

DEV: Update message_bus to 4.0.0 (#15553)

diff --git a/Gemfile.lock b/Gemfile.lock
index 7af7628..8b6a693 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -227,7 +227,7 @@ GEM
     lz4-ruby (0.3.3)
     maxminddb (0.1.22)
     memory_profiler (1.0.0)
-    message_bus (3.4.0)
+    message_bus (4.0.0)
       rack (>= 1.1.3)
     method_source (1.0.0)
     mini_mime (1.1.2)
diff --git a/config/initializers/004-message_bus.rb b/config/initializers/004-message_bus.rb
index 70c7c78..6d928ed 100644
--- a/config/initializers/004-message_bus.rb
+++ b/config/initializers/004-message_bus.rb
@@ -68,7 +68,6 @@ def setup_message_bus_env(env)
       group_ids: group_ids,
       is_admin: is_admin,
       site_id: RailsMultisite::ConnectionManagement.current_db
-
     }
     env["__mb"] = hash
   end
@@ -117,7 +116,8 @@ if Rails.env == "test"
 else
   MessageBus.redis_config = GlobalSetting.message_bus_redis_config
 end
-MessageBus.reliable_pub_sub.max_backlog_size = GlobalSetting.message_bus_max_backlog_size
+
+MessageBus.backend_instance.max_backlog_size = GlobalSetting.message_bus_max_backlog_size
 
 if SiteSetting.table_exists? && SiteSetting.where(name: ['enable_long_polling', 'long_polling_interval']).exists?
   Discourse.deprecate("enable_long_polling/long_polling_interval have switched from site settings to global settings. Remove the override from the Site Settings UI, and use a config file or environment variables to set the global settings.", drop_from: '2.9.0')
@@ -129,8 +129,6 @@ else
   MessageBus.long_polling_interval = GlobalSetting.long_polling_interval || 25000
 end
 
-MessageBus.cache_assets = !Rails.env.development?
-
 if Rails.env == "test" || $0 =~ /rake$/
   # disable keepalive in testing
   MessageBus.keepalive_interval = -1

GitHub sha: aee9fcd2571516ba3c852a1858bef2e4f605cc37

This commit appears in #15553 which was approved by SamSaffron. It was merged by SamSaffron.