Pulse V1.0.0

Pulse

Anything about cross-server messaging, in one place.

Smart Subscriptions

Easily subscribe, unsubscribe, and track active listeners with safety checks.

Safe & Reliable

Extra guardrails on top of MessagingService to reduce errors.

Extensible by Design

Add your own utilities and build on Pulse without fighting the API.

What is Pulse?

Pulse is an extensible messaging framework for Roblox built on top of MessagingService. Where Roblox gives you a raw pub/sub system, Pulse gives you servers, topics, and utilities that make communication organized, reliable, and scalable.

Installation

Roblox Installation

You can download Pulse from this [link]

After downloading, drag the Module into ServerScriptService


Rojo/Wally Installation

As of Pulse V1.0.0 there is no wally/rojo installation workflow.

Getting Started

Creating a new Server


After downloading Pulse, let's initialize it so it's ready to use.

To use Pulse, you first need to create a new server. Here's how:


Start by requiring Pulse

 local Pulse = require(path.to.Pulse)

After requiring Pulse, we can use .newServer() to crate a new server.

 local MyServer = Pulse.newServer("MyServer")
warning Warning

There cant be more than 1 service with the same name.


If you need to get a Server from another script, you can use .GetServer() to get the server.

 --mainServer script
local mainServer = Pulse.newServer("mainServer")
--other script
local mainServer = Pulse.GetServer("mainServer")

Creating a new Topic


after we create a server, we will have to create a new topic to publish or subscribe. For that we can use the .newTopic() method.

 local MyServer = Pulse.newServer("MyServer")
local MyTopic = Pulse.newTopic(MyServer, "MyTopic")
warning Warning

There cant be more than 1 topic with the same name.


If you need to get a Topic from another script, you can use .GetTopic() to get the topic.

 --mainServer script
local announcementTopic = Pulse.newTopic("announcement")
--other script
local announcementTopic = Pulse.GetTopic("announcement")

info Info

Additionally, if for some reason you need to get all servers or topics you can use the .GetTopics() for topics and .GetServers() for servers.


Subscribing & Publishing


After making a service and a topic, we can start by subscribing to a topic, to do that you will have to use the :Subscribe() method on your server.

 local MyServer = Pulse.newServer("MyServer")
local MyTopic = Pulse.newTopic(MyServer, "MyTopic")

MyServer:Subscribe(MyTopic, function(data)
    print(data.Data)
end)

This will subscribe to the server to the topic, and whenever data gets published it will print the data.


Publishing Data

To publish/send data use the :Publish() method on your server.

 local MyServer = Pulse.newServer("MyServer")
local MyTopic = Pulse.newTopic(MyServer, "MyTopic")
MyServer:Publish(MyTopic, "Hello World!")

lightbulb Tip

Before calling Publish subscribe to the topic! (i know, ground breaking discovery)


PublishBatch

If you have to send the same data to multiple topics, you can use the :PublishBatch() method on your server.

 local MyServer = Pulse.newServer("MyServer")
local MyTopic = Pulse.newTopic(MyServer, "MyTopic")
local MyOtherTopic = Pulse.newTopic(MyServer, "MyOtherTopic")

MyServer:Publish({MyTopic, MyOtherTopic}, "Hello World!")

lightbulb Tip

It is best practice you put your topics in a table and then pass the table as the first argument.


Unsubscribing from Topics & Destroying Topics


To Unsubscribe from a topic use the :Unsubscribe() method.

 local MyServer = Pulse.newServer("MyServer")
local MyTopic = Pulse.newTopic(MyServer, "MyTopic")

MyServer:Unsubscribe(MyTopic)

To destroy a topic use the :Destroy() method.

 local MyServer = Pulse.newServer("MyServer")
local MyTopic = Pulse.newTopic(MyServer, "MyTopic")
MyTopic:Destroy()

Scheduling publishes


If you want to schedule publishes you will have to use the :Schedule() method.

 local MyServer = Pulse.newServer("MyServer")
local MyTopic = Pulse.newTopic(MyServer, "MyTopic")

MyServer:Schedule(MyTopic, 5, "Hello World!")

Utility functions


Getting the topics associated with a server

If for some reason you need to know what topics a server has use the :GetTopics() method on your server.

 local MyServer = Pulse.newServer("MyServer")
MyServer:GetTopics() -- will return a table with topics

Getting the server of a topic

If for some reason you need the server of a topic, you will have to use the :GetServer() method on your prefereed topic.

 local MyTopic = Pulse.newTopic(MyServer, "MyTopic")
MyTopic:GetServer() -- will return the server instance

Getting a topics subscriptions & Setting max subscriptions

To get the current amount of subscriptions of a topic use the :GetSubscriptions() method.

 local MyTopic = Pulse.newTopic(MyServer, "MyTopic")
MyTopic:GetSubscriptions() -- will return the amount of current subscribers

To set the max amount of subscriptions a topic can have use the :SetMaxSubscriptions() method.

 local MyTopic = Pulse.newTopic(MyServer, "MyTopic")
MyTopic:SetMaxSubscriptions(5) -- If you want your it to be infinite, don't pass any arguments. (infinite by default)

API Reference

.newServer() [Constructor] [Static]


Creates a new server.

Paramaters

serverName string The name of the server.

Returns

Returns the server.

.newTopic() [Constructor] [Static]


Creates a new topic.

Paramaters

server Server The server object.
topicName string The name of the topic.

Returns

Returns the topic.

.GetServer() [Instance] [Read Only] [Nullable]


Returns the server object from the name.

Paramaters

serverName string The name of the server you want to get.

Returns

Returns the Server.

.GetTopic() [Instance] [Read Only] [Nullable]


Returns the topic object from the name.

Paramaters

topicName string The name of the topic you want to get.

Returns

Returns the Topic.

.GetTopics() [Instance] [Read Only]


Returns all topics inside a table.

Returns

Returns a table with topics.

.GetServers() [Instance] [Read Only]


Returns all servers inside a table.

Returns

Returns a table with servers.

:Subscribe() [Instance]


Subscribes to a topic.

Paramaters

topic Topic The topic instance to subscribe.
callback Function The callback that will be executed when data gets sent.

Returns

The callback returns a data table.
The method returns a CallbackResult.

:Unsubscribe() [Instance]


Unsubscribes from a topic.

Paramaters

topic Topic The topic instance to unsubscribe.

Returns

Returns a CallbackResult.

:Publish() [Instance] [Async]


Publishes data to a topic.

Paramaters

topic Topic The topic instance to send data to.
data any The data to be published.

Returns

Returns a CallbackResult.

:PublishBatch() [Instance] [Async]


Publishes data to multiple topics.

Paramaters

topics { Topic } The table of topics to send data to.
data any The data to be published.

Returns

Returns a CallbackResult.

:Schedule() [Instance] [Async] [Yields]


Publishes data to a topic after a delay.

Paramaters

topic Topic The topic instance to send data to.
delayTime number The delay to wait. [Optional]
data any The data to be published.

Returns

Returns a CallbackResult.

:GetTopics() [Instance] [Read Only]


Returns the topics associated with a server.

Returns

Returns a tabe with topics.

:GetServer() [Instance] [Read Only] [Nullable]


Returns the server of a topic.

Returns

Returns the server associated with a topic

:Destroy() [Instance]


Destroys a topic.


:GetSubscriptions() [Instance] [Read Only]


Returns the amount of subscriptions a topic has.

Returns

Returns a number

:SetMaxSubscriptions() [Instance]


Sets the max subscriptions a topic can have.

Paramaters

limit number The limit of subscriptions it can have. (Default is infinite) [Optional]

Change Logs


19.08.2025


Release day!