diff --git a/healthMonitor.cpp b/healthMonitor.cpp
index 3523b79..05f9cbc 100644
--- a/healthMonitor.cpp
+++ b/healthMonitor.cpp
@@ -417,7 +417,7 @@
         return;
     }
 
-    sdbusplus::message::message msg = bus.new_method_call(
+    sdbusplus::message_t msg = bus.new_method_call(
         "org.freedesktop.systemd1", "/org/freedesktop/systemd1",
         "org.freedesktop.systemd1.Manager", "StartUnit");
     msg.append(sysdUnit, "replace");
@@ -436,7 +436,7 @@
             // Find all BMCs (DBus objects implementing the
             // Inventory.Item.Bmc interface that may be created by
             // configuring the Inventory Manager)
-            sdbusplus::message::message msg = bus.new_method_call(
+            sdbusplus::message_t msg = bus.new_method_call(
                 "xyz.openbmc_project.ObjectMapper",
                 "/xyz/openbmc_project/object_mapper",
                 "xyz.openbmc_project.ObjectMapper", "GetSubTreePaths");
@@ -454,7 +454,7 @@
             msg.append(std::vector<std::string>{
                 "xyz.openbmc_project.Inventory.Item.Bmc"});
 
-            sdbusplus::message::message reply = bus.call(msg, 0);
+            sdbusplus::message_t reply = bus.call(msg, 0);
             reply.read(bmcIds);
             info("BMC inventory found");
         }
@@ -640,11 +640,11 @@
 
     // If the SystemInventory does not exist: wait for the InterfaceAdded signal
     auto interfacesAddedSignalHandler =
-        std::make_unique<sdbusplus::bus::match::match>(
-            static_cast<sdbusplus::bus::bus&>(*conn),
+        std::make_unique<sdbusplus::bus::match_t>(
+            static_cast<sdbusplus::bus_t&>(*conn),
             sdbusplus::bus::match::rules::interfacesAdded(
                 phosphor::health::BMCActivationPath),
-            [conn](sdbusplus::message::message& msg) {
+            [conn](sdbusplus::message_t& msg) {
                 sdbusplus::message::object_path o;
                 msg.read(o);
                 if (!needUpdate && o.str == phosphor::health::BMCActivationPath)
diff --git a/healthMonitor.hpp b/healthMonitor.hpp
index b5013c8..b86563e 100644
--- a/healthMonitor.hpp
+++ b/healthMonitor.hpp
@@ -25,9 +25,9 @@
 // Used for identifying the BMC inventory creation signal
 const char* BMCActivationPath = "/xyz/openbmc_project/inventory/bmc/activation";
 
-bool FindSystemInventoryInObjectMapper(sdbusplus::bus::bus& bus)
+bool FindSystemInventoryInObjectMapper(sdbusplus::bus_t& bus)
 {
-    sdbusplus::message::message msg =
+    sdbusplus::message_t msg =
         bus.new_method_call("xyz.openbmc_project.ObjectMapper",
                             "/xyz/openbmc_project/object_mapper",
                             "xyz.openbmc_project.ObjectMapper", "GetObject");
@@ -36,7 +36,7 @@
 
     try
     {
-        sdbusplus::message::message reply = bus.call(msg, 0);
+        sdbusplus::message_t reply = bus.call(msg, 0);
         return true;
     }
     catch (const std::exception& e)
@@ -57,9 +57,8 @@
     sdbusplus::xyz::openbmc_project::Association::server::Definitions;
 
 using healthIfaces =
-    sdbusplus::server::object::object<ValueIface, CriticalInterface,
-                                      WarningInterface,
-                                      AssociationDefinitionInterface>;
+    sdbusplus::server::object_t<ValueIface, CriticalInterface, WarningInterface,
+                                AssociationDefinitionInterface>;
 
 using AssociationTuple = std::tuple<std::string, std::string, std::string>;
 
@@ -92,7 +91,7 @@
      * @param[in] bus     - Handle to system dbus
      * @param[in] objPath - The Dbus path of health sensor
      */
-    HealthSensor(sdbusplus::bus::bus& bus, const char* objPath,
+    HealthSensor(sdbusplus::bus_t& bus, const char* objPath,
                  HealthConfig& sensorConfig,
                  const std::vector<std::string>& bmcIds) :
         healthIfaces(bus, objPath),
@@ -116,7 +115,7 @@
 
   private:
     /** @brief sdbusplus bus client connection. */
-    sdbusplus::bus::bus& bus;
+    sdbusplus::bus_t& bus;
     /** @brief Sensor config from config file */
     HealthConfig& sensorConfig;
     /** @brief the Event Loop structure */
@@ -147,7 +146,7 @@
      *
      * @param[in] bus     - Handle to system dbus
      */
-    HealthMon(sdbusplus::bus::bus& bus) : bus(bus)
+    HealthMon(sdbusplus::bus_t& bus) : bus(bus)
     {
         // Read JSON file
         sensorConfigs = getHealthConfig();
@@ -168,7 +167,7 @@
     void createHealthSensors(const std::vector<std::string>& bmcIds);
 
   private:
-    sdbusplus::bus::bus& bus;
+    sdbusplus::bus_t& bus;
     std::vector<HealthConfig> sensorConfigs;
     std::vector<HealthConfig> getHealthConfig();
 };
