diff --git a/http/server_sent_event.hpp b/http/server_sent_event.hpp
index 76d10c0..906c326 100644
--- a/http/server_sent_event.hpp
+++ b/http/server_sent_event.hpp
@@ -32,7 +32,7 @@
 
     virtual boost::asio::io_context& getIoContext() = 0;
     virtual void close(std::string_view msg = "quit") = 0;
-    virtual void sendEvent(std::string_view id, std::string_view msg) = 0;
+    virtual void sendSseEvent(std::string_view id, std::string_view msg) = 0;
 };
 
 template <typename Adaptor>
@@ -189,7 +189,7 @@
         doWrite();
     }
 
-    void sendEvent(std::string_view id, std::string_view msg) override
+    void sendSseEvent(std::string_view id, std::string_view msg) override
     {
         if (msg.empty())
         {
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
index 38d68cb..6a936cb 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
@@ -289,7 +289,7 @@
 
     ~Subscription() = default;
 
-    bool sendEvent(std::string&& msg)
+    bool sendEventToSubscriber(std::string&& msg)
     {
         persistent_data::EventServiceConfig eventServiceConfig =
             persistent_data::EventServiceStore::getInstance()
@@ -311,7 +311,7 @@
         if (sseConn != nullptr)
         {
             eventSeqNum++;
-            sseConn->sendEvent(std::to_string(eventSeqNum), msg);
+            sseConn->sendSseEvent(std::to_string(eventSeqNum), msg);
         }
         return true;
     }
@@ -409,7 +409,7 @@
 
         std::string strMsg =
             msg.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
-        return sendEvent(std::move(strMsg));
+        return sendEventToSubscriber(std::move(strMsg));
     }
 
     void filterAndSendEventLogs(
@@ -453,7 +453,7 @@
         msg["Events"] = std::move(logEntryArray);
         std::string strMsg =
             msg.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
-        sendEvent(std::move(strMsg));
+        sendEventToSubscriber(std::move(strMsg));
         eventSeqNum++;
     }
 
@@ -492,7 +492,7 @@
 
         std::string strMsg =
             msg.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
-        sendEvent(std::move(strMsg));
+        sendEventToSubscriber(std::move(strMsg));
     }
 
     void updateRetryConfig(uint32_t retryAttempts,
@@ -950,7 +950,7 @@
             {
                 nlohmann::json msg = messages::eventBufferExceeded();
                 // If the buffer overloaded, send all messages.
-                subValue->sendEvent(msg);
+                subValue->sendEventToSubscriber(msg);
                 lastEvent = messages.begin();
             }
             else
@@ -963,7 +963,7 @@
                      lastEvent;
                  lastEvent != messages.end(); lastEvent++)
             {
-                subValue->sendEvent(event->message);
+                subValue->sendEventToSubscriber(event->message);
             }
         }
         return id;
@@ -1091,7 +1091,7 @@
 
             std::string strMsg = msgJson.dump(
                 2, ' ', true, nlohmann::json::error_handler_t::replace);
-            entry->sendEvent(std::move(strMsg));
+            entry->sendEventToSubscriber(std::move(strMsg));
             eventId++; // increment the eventId
         }
     }
diff --git a/test/http/server_sent_event_test.cpp b/test/http/server_sent_event_test.cpp
index 13ae7f1..bf5cee3 100644
--- a/test/http/server_sent_event_test.cpp
+++ b/test/http/server_sent_event_test.cpp
@@ -65,7 +65,7 @@
     }
     // Send one event
     {
-        conn->sendEvent("TestEventId", "TestEventContent");
+        conn->sendSseEvent("TestEventId", "TestEventContent");
         std::string_view expected = "id: TestEventId\n"
                                     "data: TestEventContent\n"
                                     "\n";
@@ -85,7 +85,7 @@
     }
     // Send second event
     {
-        conn->sendEvent("TestEventId2", "TestEvent\nContent2");
+        conn->sendSseEvent("TestEventId2", "TestEvent\nContent2");
         constexpr std::string_view expected =
             "id: TestEventId2\n"
             "data: TestEvent\n"
