Skip to main content
Transient messages are fire-and-forget messages that are delivered to online recipients in real time but never stored on the CometChat server. They’re ideal for ephemeral interactions like game state updates, cursor positions, or temporary notifications.

When to Use Transient Messages

Transient messages are not delivered to offline users and cannot be fetched from message history. If you need message persistence, use regular messages instead.

Send a Transient Message

Use SendTransientMessage on the Subsystem. This is a fire-and-forget call — there’s no success/failure callback.
  1. Create an FCometChatTransientMessage struct
  2. Set ReceiverId (user UID or group GUID), ReceiverType (user or group), and Data (your custom payload)
  3. Call Send Transient Message on the CometChat Subsystem

Receive Transient Messages

Bind to the OnTransientMessageReceived delegate to receive transient messages from other users.
  1. Get a reference to the CometChat Subsystem
  2. Bind to On Transient Message Received
  3. The custom event receives an FCometChatTransientMessage with the sender, receiver info, and data payload

FCometChatTransientMessage


Message Flow

Data format: The Data field is a free-form string. We recommend using JSON so receivers can parse it easily. Define a schema for your transient message types (e.g., {"type":"cursor","x":100,"y":200}) so handlers can route by type.

Example: Player Position Sync

A common game pattern — broadcast player position to group members at high frequency:
  1. On a Timer (e.g., every 0.1s), get the player’s world location
  2. Serialize to JSON: {"type":"pos","x":...,"y":...,"z":...}
  3. Call Send Transient Message to the game’s group GUID
  4. On receive, parse the JSON and update the remote player’s position

Next Steps

Real-Time Events

See all real-time delegates including transient messages.

Advanced Configuration

Control connection lifecycle for optimal performance.