diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
index 0bce29f..6b3f84f 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
@@ -606,7 +606,7 @@
     std::streampos redfishLogFilePosition{0};
     size_t noOfEventLogSubscribers{0};
     size_t noOfMetricReportSubscribers{0};
-    std::shared_ptr<sdbusplus::bus::match::match> matchTelemetryMonitor;
+    std::shared_ptr<sdbusplus::bus::match_t> matchTelemetryMonitor;
     boost::container::flat_map<std::string, std::shared_ptr<Subscription>>
         subscriptionsMap;
 
@@ -1337,7 +1337,7 @@
     }
 
 #endif
-    static void getReadingsForReport(sdbusplus::message::message& msg)
+    static void getReadingsForReport(sdbusplus::message_t& msg)
     {
         if (msg.is_method_error())
         {
@@ -1409,7 +1409,7 @@
                                "interface='org.freedesktop.DBus.Properties',"
                                "arg0=xyz.openbmc_project.Telemetry.Report";
 
-        matchTelemetryMonitor = std::make_shared<sdbusplus::bus::match::match>(
+        matchTelemetryMonitor = std::make_shared<sdbusplus::bus::match_t>(
             *crow::connections::systemBus, matchStr, getReadingsForReport);
     }
 };
diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index f8ba322..9a8142d 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -1584,7 +1584,7 @@
 
         crow::connections::systemBus->async_method_call(
             [asyncResp, username, password](const boost::system::error_code ec2,
-                                            sdbusplus::message::message& m) {
+                                            sdbusplus::message_t& m) {
             if (ec2)
             {
                 userErrorMessageHandler(m.get_error(), asyncResp, username, "");
@@ -1900,8 +1900,7 @@
     crow::connections::systemBus->async_method_call(
         [asyncResp, username, password(std::move(password)),
          roleId(std::move(roleId)), enabled, newUser{std::string(*newUserName)},
-         locked](const boost::system::error_code ec,
-                 sdbusplus::message::message& m) {
+         locked](const boost::system::error_code ec, sdbusplus::message_t& m) {
         if (ec)
         {
             userErrorMessageHandler(m.get_error(), asyncResp, newUser,
diff --git a/redfish-core/lib/certificate_service.hpp b/redfish-core/lib/certificate_service.hpp
index c2c873d..22d77a7 100644
--- a/redfish-core/lib/certificate_service.hpp
+++ b/redfish-core/lib/certificate_service.hpp
@@ -199,7 +199,7 @@
     std::filesystem::path certDirectory;
 };
 
-static std::unique_ptr<sdbusplus::bus::match::match> csrMatcher;
+static std::unique_ptr<sdbusplus::bus::match_t> csrMatcher;
 /**
  * @brief Read data from CSR D-bus object and set to response
  *
@@ -441,10 +441,9 @@
                           objectPath +
                           "',"
                           "member='InterfacesAdded'");
-        csrMatcher = std::make_unique<sdbusplus::bus::match::match>(
+        csrMatcher = std::make_unique<sdbusplus::bus::match_t>(
             *crow::connections::systemBus, match,
-            [asyncResp, service, objectPath,
-             certURI](sdbusplus::message::message& m) {
+            [asyncResp, service, objectPath, certURI](sdbusplus::message_t& m) {
             timeout.cancel();
             if (m.is_method_error())
             {
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 120a751..6285aa8 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -693,9 +693,9 @@
                            const std::string& dumpType)
 {
     std::shared_ptr<task::TaskData> task = task::TaskData::createTask(
-        [dumpId, dumpPath, dumpType](
-            boost::system::error_code err, sdbusplus::message::message& m,
-            const std::shared_ptr<task::TaskData>& taskData) {
+        [dumpId, dumpPath,
+         dumpType](boost::system::error_code err, sdbusplus::message_t& m,
+                   const std::shared_ptr<task::TaskData>& taskData) {
         if (err)
         {
             BMCWEB_LOG_ERROR << "Error in creating a dump";
@@ -3087,7 +3087,7 @@
                 return;
             }
             std::shared_ptr<task::TaskData> task = task::TaskData::createTask(
-                [](boost::system::error_code err, sdbusplus::message::message&,
+                [](boost::system::error_code err, sdbusplus::message_t&,
                    const std::shared_ptr<task::TaskData>& taskData) {
                 if (!err)
                 {
diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp
index a7f8a41..becb794 100644
--- a/redfish-core/lib/processor.hpp
+++ b/redfish-core/lib/processor.hpp
@@ -929,7 +929,7 @@
     handleAppliedConfigResponse(const std::shared_ptr<bmcweb::AsyncResp>& resp,
                                 const std::string& setPropVal,
                                 boost::system::error_code ec,
-                                const sdbusplus::message::message& msg)
+                                const sdbusplus::message_t& msg)
 {
     if (!ec)
     {
@@ -1035,7 +1035,7 @@
     // Set the property, with handler to check error responses
     crow::connections::systemBus->async_method_call(
         [resp, appliedConfigUri](const boost::system::error_code ec,
-                                 const sdbusplus::message::message& msg) {
+                                 const sdbusplus::message_t& msg) {
         handleAppliedConfigResponse(resp, appliedConfigUri, ec, msg);
         },
         *controlService, cpuObjectPath, "org.freedesktop.DBus.Properties",
diff --git a/redfish-core/lib/task.hpp b/redfish-core/lib/task.hpp
index 8892614..7d96e42 100644
--- a/redfish-core/lib/task.hpp
+++ b/redfish-core/lib/task.hpp
@@ -84,10 +84,10 @@
 struct TaskData : std::enable_shared_from_this<TaskData>
 {
   private:
-    TaskData(std::function<bool(boost::system::error_code,
-                                sdbusplus::message::message&,
-                                const std::shared_ptr<TaskData>&)>&& handler,
-             const std::string& matchIn, size_t idx) :
+    TaskData(
+        std::function<bool(boost::system::error_code, sdbusplus::message_t&,
+                           const std::shared_ptr<TaskData>&)>&& handler,
+        const std::string& matchIn, size_t idx) :
         callback(std::move(handler)),
         matchStr(matchIn), index(idx),
         startTime(std::chrono::system_clock::to_time_t(
@@ -101,8 +101,7 @@
     TaskData() = delete;
 
     static std::shared_ptr<TaskData>& createTask(
-        std::function<bool(boost::system::error_code,
-                           sdbusplus::message::message&,
+        std::function<bool(boost::system::error_code, sdbusplus::message_t&,
                            const std::shared_ptr<TaskData>&)>&& handler,
         const std::string& match)
     {
@@ -111,7 +110,7 @@
         {
             MakeSharedHelper(
                 std::function<bool(boost::system::error_code,
-                                   sdbusplus::message::message&,
+                                   sdbusplus::message_t&,
                                    const std::shared_ptr<TaskData>&)>&& handler,
                 const std::string& match2, size_t idx) :
                 TaskData(std::move(handler), match2, idx)
@@ -179,7 +178,7 @@
                 ec = boost::asio::error::operation_aborted;
             }
             self->match.reset();
-            sdbusplus::message::message msg;
+            sdbusplus::message_t msg;
             self->finishTask();
             self->state = "Cancelled";
             self->status = "Warning";
@@ -268,10 +267,10 @@
         {
             return;
         }
-        match = std::make_unique<sdbusplus::bus::match::match>(
-            static_cast<sdbusplus::bus::bus&>(*crow::connections::systemBus),
+        match = std::make_unique<sdbusplus::bus::match_t>(
+            static_cast<sdbusplus::bus_t&>(*crow::connections::systemBus),
             matchStr,
-            [self = shared_from_this()](sdbusplus::message::message& message) {
+            [self = shared_from_this()](sdbusplus::message_t& message) {
             boost::system::error_code ec;
 
             // callback to return True if callback is done, callback needs
@@ -298,7 +297,7 @@
         sendTaskEvent(state, index);
     }
 
-    std::function<bool(boost::system::error_code, sdbusplus::message::message&,
+    std::function<bool(boost::system::error_code, sdbusplus::message_t&,
                        const std::shared_ptr<TaskData>&)>
         callback;
     std::string matchStr;
@@ -308,7 +307,7 @@
     std::string state;
     nlohmann::json messages;
     boost::asio::steady_timer timer;
-    std::unique_ptr<sdbusplus::bus::match::match> match;
+    std::unique_ptr<sdbusplus::bus::match_t> match;
     std::optional<time_t> endTime;
     std::optional<Payload> payload;
     bool gave204 = false;
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index 1beef2e..6cf15d6 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -28,8 +28,8 @@
 {
 
 // Match signals added on software path
-static std::unique_ptr<sdbusplus::bus::match::match> fwUpdateMatcher;
-static std::unique_ptr<sdbusplus::bus::match::match> fwUpdateErrorMatcher;
+static std::unique_ptr<sdbusplus::bus::match_t> fwUpdateMatcher;
+static std::unique_ptr<sdbusplus::bus::match_t> fwUpdateErrorMatcher;
 // Only allow one update at a time
 static bool fwUpdateInProgress = false;
 // Timer for software available
@@ -63,8 +63,7 @@
 // then no asyncResp updates will occur
 static void
     softwareInterfaceAdded(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
-                           sdbusplus::message::message& m,
-                           task::Payload&& payload)
+                           sdbusplus::message_t& m, task::Payload&& payload)
 {
     dbus::utility::DBusInteracesMap interfacesProperties;
 
@@ -120,7 +119,7 @@
                     std::shared_ptr<task::TaskData> task =
                         task::TaskData::createTask(
                             [](boost::system::error_code ec,
-                               sdbusplus::message::message& msg,
+                               sdbusplus::message_t& msg,
                                const std::shared_ptr<task::TaskData>&
                                    taskData) {
                         if (ec)
@@ -296,26 +295,25 @@
         }
     });
     task::Payload payload(req);
-    auto callback =
-        [asyncResp, payload](sdbusplus::message::message& m) mutable {
+    auto callback = [asyncResp, payload](sdbusplus::message_t& m) mutable {
         BMCWEB_LOG_DEBUG << "Match fired";
         softwareInterfaceAdded(asyncResp, m, std::move(payload));
     };
 
     fwUpdateInProgress = true;
 
-    fwUpdateMatcher = std::make_unique<sdbusplus::bus::match::match>(
+    fwUpdateMatcher = std::make_unique<sdbusplus::bus::match_t>(
         *crow::connections::systemBus,
         "interface='org.freedesktop.DBus.ObjectManager',type='signal',"
         "member='InterfacesAdded',path='/xyz/openbmc_project/software'",
         callback);
 
-    fwUpdateErrorMatcher = std::make_unique<sdbusplus::bus::match::match>(
+    fwUpdateErrorMatcher = std::make_unique<sdbusplus::bus::match_t>(
         *crow::connections::systemBus,
         "interface='org.freedesktop.DBus.ObjectManager',type='signal',"
         "member='InterfacesAdded',"
         "path='/xyz/openbmc_project/logging'",
-        [asyncResp, url](sdbusplus::message::message& m) {
+        [asyncResp, url](sdbusplus::message_t& m) {
         std::vector<std::pair<std::string, dbus::utility::DBusPropertiesMap>>
             interfacesProperties;
         sdbusplus::message::object_path objPath;
