Why Stream is the Best Alternative to PubNub Chat

Emily N.
Emily N.
Published December 13, 2019 Updated June 17, 2025

Launching your in-app chat feature is critical for user conversion, engagement, retention, and satisfaction, which means choosing the right provider to build it for you is just as important.

Stream and PubNub are two major options in the in-app messaging space, so you might compare the two chat API providers when evaluating solutions.

Here, we analyze both chat offerings.

PubNub

PubNub is a lower-level, enterprise-grade pub/sub platform that expanded into chat with the launch of its chat service in 2019. While its API continues to serve high-scale use cases, the Chat SDKs have evolved to support core messaging features across JavaScript, Swift, Kotlin, Unity, and Unreal Engine.

Rather than offering pre-built UI components, PubNub's approach is intentionally UI-agnostic. Developers are responsible for building the interface or integrating with open-source libraries. 

Stream, on the other hand, includes customizable, production-ready UI kits across web, mobile, and gaming platforms to accelerate frontend development.

On the backend, PubNub supports features like message threads, file attachments, reactions, offline access via Message Persistence, and flexible access control. Its architecture enables multi-tenant applications using patterns like tenant-specific encryption and wildcard channels. 

Stream simplifies this with a dedicated multi-tenancy and built-in AI content moderation.

For developers seeking more complete tooling out of the box---including visual components, permissioned channel types, and automated moderation---Stream offers a faster path to delivering polished chat experiences without stitching together additional systems.

Stream

Stream's chat API and chat SDKs are the most performant solutions today. The enterprise-grade cloud components make it easy for software teams to add a complete in-app chat experience to their products without reinventing the wheel — saving time, money, and resources to focus on their core competencies.

Stream's scalable APIs and SDKs come with all the building blocks to ship a custom white-label experience that rivals today's leading social platforms, serving over a billion end users. Stream's back-end infrastructure, customizable UI kits, and front-end SDKs combine to form the fastest, most reliable, and feature-rich component solution.

Component libraries are available for:

  1. Android (Jetpack Compose)
  2. iOS, (SwiftUI)
  3. Web (React, Angular, JS)
  4. React Native
  5. Flutter
  6. Gaming (Unreal or Unity)

The UI kit comes with customizable UI components for the four most common chat/messaging use cases to simplify designing your app. You can easily and quickly craft a beautiful chat app with Stream's high-quality UI kit for Sketch, Figma, and Adobe XD.

Interfaces for the following use cases are included:

  • Social Chat
  • Team Collaboration
  • Live Streaming
  • Video Games

Selecting the use case will modify your chat settings depending on which one you choose. For example, choosing the Live Streaming use case will turn off typing indicators and read status since the volume of messages will likely be high. You can check out Stream's UI kit in the live demos to see the difference between these use cases.

Stream vs PubNub

Stream's Strengths as a PubNub Alternative

  • PubNub’s newer Chat SDKs are UI-agnostic and no longer include official UI component libraries. Their previous React components are also being deprecated. In contrast, Stream offers production-ready UI kits across all major platforms.

  • Stream offers a UI kit with customizable interfaces for different use cases in both light and dark modes. PubNub does not provide any reusable visual components.

  • Stream has UI components for Android Compose and SwiftUI. Google and Apple are pushing for these frameworks to be the leading way to build mobile applications in the future.

  • Stream's front-end components include built-in support for unread counts, connection recovery, message states, and read events. You can build those features on top of PubNub's API yourself, but it's easy to make mistakes, especially if you're under a tight deadline, costing you more time and resources.

  • Stream helps you ship in-app chat messaging with all of the features users expect, including message reactions, thread replies, slash commands, unread count, and attachments — which PubNub doesn't offer right out of the box.

  • Stream provides edge servers for chat, reducing latency and timeout errors when connected with Stream. In contrast, PubNub's chat SDKs run atop its general-purpose real-time infrastructure, which includes a global PoP network.

  • Stream's chat API enables you to create channel types that give you complete control over permissions and features, providing the flexibility that PubNub lacks. Channel types allow you to configure your detailed permissions and enable/disable features such as link sharing, read indicators, typing indicators, etc.

  • Stream Chat offers Advanced Chat Moderation with automatic message flagging and blocking as well as AI-powered AutoModeration, whereas other in-app chat providers like PubNub require the addition of a costly third-party moderation tool to achieve similar results.

  • PubNub's pricing is confusing, and very difficult to estimate what you'll be paying. PubNub's pricing is not built around their chat offering — it's built around being a low-level pub/sub-framework.

The UI kit comes with customizable UI components for the four most common chat/messaging use cases to make designing your app simple. You can easily and quickly craft a beautiful chat app with Stream’s high-quality UI kit for Sketch, Figma, and Adobe XD. Interfaces for the following use cases are included:

  • Social Chat
  • Team Collaboration
  • Live Streaming
  • Video Games

Selecting the use case will modify your chat settings depending on which one you choose. For example, choosing the Live Streaming use case will turn off typing indicators and read status since the volume of messages will likely be high. You can check out Stream’s UI kit in the live demos to see the difference between these use cases.

Stream vs PubNub 1
Building your own app? Get early access to our Livestream or Video Calling API and launch in days!

Stream powers activity feeds and chat for over a billion end users. The technology is based on Go, RocksDB & Raft. This tech stack is similar to what Google, Instagram, and LinkedIn use. The APIs typically respond in 20ms, and they offer a 99.999% uptime SLA on enterprise plans.

Here is a review of PubNub’s messaging features compared to Stream’s:
FeatureStreamPubNub
Native design assetsYes
Customizable UI componentsYes
1:1 MessagingYesYes
Group MessagingYesYes
Channel MessagingYesYes
@mentionsYesYes
SearchYesYes
Pinned MessagesYesYes
Custom ObjectsYesYes
Custom User and Channel EventsYesYes
Slash CommandsYesYes
FunctionsYes
Rich URL PreviewYes
Typing IndicatorsYesYes
Message attachments and actionsYesYes
Read receiptsYesYes
Unread Message CountsYesYes
Delivered IndicatorsYesYes
Online User PresenceYesYes
User to User MuteYesYes
User to User BlockYesYes
Offline SupportYesYes
Custom MetadataYesYes
ReactionsYesYes
Threads and RepliesYesYes
User InvitesYesYes
Video PlaybackYesYes
File UploadsYesYes
Custom role management via SDKYes
GiphyYesYes
Push NotificationsYesYes
EmoticonsYesYes
TranslationsYesYes
Dedicated Multi Tenant APIYes
Scalability for Live EventsYesYes
Built-In AI Text ModerationYes
Built-In AI Image ModerationYes
Moderation Ban UserYesYes
Moderation DashboardYesYes
Slow ModeYesYes
Announcement APIYes
ReactYesYes
React NativeYesJS Chat SDK (framework agnostic)
FlutterYesJS Chat SDK (framework agnostic)
iOSYesYes
AndroidYesYes
UnityYesYes
UnrealYesYes
AngularYesJS Chat SDK (framework agnostic)
SwiftUIYesvia Swift Chat SDK
Jetpack ComposeYesvia Kotlin Chat SDK
Livestream Traffic Feature SwitchesYesYes
Security ComplianceYesYes
GDPR-friendly API endpointsYesYes
Customer SupportYesYes

Security and Compliance

Stream completed its SOC 2 Type II and ISO 27001 audits, achieving compliance with the organization's rigorous security standards. The certifications verify Stream's dedication to providing a highly secure in-app chat solution to enterprise customers and the company's existing HIPAA and General Data Protection Regulation (GDPR) compliance.

These security certifications mean users can rest assured that their data is protected during processing — no small thing in today's technologically-run world. These compliance achievements give Stream's users even more confidence in how Stream manages real-time data globally. Our customers trust their in-app chat providers by outsourcing their chat development so that they can focus on activities that are more core to their business, so it's important to prioritize transparency.

PubNub also maintains SOC 2 Type II and ISO 27001 certifications, and offers customers the ability to configure regional data processing (e.g., EU or APAC only). Teams evaluating providers should carefully review how compliance documentation is shared and which regions their data flows through, to ensure alignment with organizational policies and user expectations.

Stream vs. PubNub Code-Level Comparison

Ultimately, a chat SDK must always be integrated into an existing product. Here’s a quick look at how each provider supports that process, particularly for React developers.

PubNub previously offered a React component library, but this is being deprecated as of January 1, 2025. PubNub's new approach is based on UI-agnostic Chat SDKs across platforms like JavaScript, Swift, and Kotlin. These SDKs focus on backend functionality, allowing developers to build or integrate their own frontend components using the frameworks of their choice.

Stream takes a different approach. It offers a robust UI component library for React, complete with theming, extensibility, and documentation that accelerates integration. In fact, all of its SDKs for React, React Native, iOS, Android, Flutter, Angular, Unreal, and Unity include customizable UI kits designed to help teams build feature-rich messaging UIs quickly and reliably.

Here is a fully working example for the Stream SDK:

tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import 'stream-chat-react/dist/css/v2/index.css'; const user: User = { id: 'lively-bird-4', name: 'lively-bird-4'e, image: `https://getstream.io/random_png/?id=${userId}&name=${userName}`, }; const apiKey = '<your-api-key>'; const userToken = '<your-user-token>; const chatClient = new StreamChat(apiKey); chatClient.connectUser(user, userToken); const channel = chatClient.channel('messaging', 'custom_channel_id', { name: 'Talk about React', members: [userId], }); const App = () => ( <Chat client={chatClient} theme='str-chat__theme-light'> <Channel channel={channel}> <Window> <ChannelHeader /> <MessageList /> <MessageInput /> </Window> <Thread /> </Channel> </Chat> ); export default App;

While this is interesting, integration requires much more than just the most basic example possible.

Stream offers detailed guides for theming, message rendering, and behavior customization, including properties like read states, typing indicators, and reactions. These components are fully documented and ready to drop into production.

Rather than providing visual components, PubNub focuses on backend functionality, allowing developers to implement their own UI from scratch or with third-party libraries. This offers flexibility, but places more responsibility on teams to build and maintain consistent chat interfaces.

For example, Stream offers a detailed guide on how to write a custom typing indicator, with an explanation of the properties to access from the SDK for easy focus on being productive and putting something out quickly.

PubNub's SDK can support such features programmatically, but the UI must be implemented separately.

Here is an example of how the Stream code for that would look:

tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
export const CustomTypingIndicator = (props: TypingIndicatorProps) => { const { threadList } = props; const { channelConfig, thread } = useChannelStateContext(); const { client } = useChatContext(); const { typing = {} } = useTypingContext(); if (channelConfig?.typing_events === false) { return null; } const typingInChannel = !threadList ? Object.values(typing).filter( ({ parent_id, user }) => user?.id !== client.user?.id && !parent_id, ) : []; const typingInThread = threadList ? Object.values(typing).filter( ({ parent_id, user }) => user?.id !== client.user?.id && parent_id === thread?.id, ) : []; return ( <div> <div> {(threadList ? typingInThread : typingInChannel).map(({ user }, i) => ( <div className='username'> <div className='typing-indicator-name'>{user?.name}</div> <div className='typing-indicator-role '>{user?.role}</div> </div> ))} </div> <div className='str-chat__typing-indicator__dots' /> </div> ); };

PubNub’s SDK offers limited built-in customization support. Stream’s SDK, on the other hand, provides extensive customization options backed by clear, developer-friendly documentation. This makes it easy to get up and running quickly, while still giving teams the flexibility to tailor the chat experience to their product and brand.

Simple Migration

Stream can work with you painlessly and seamlessly migrate from PubNub to Stream. With our import tools and customizable interfaces, we can help you transition your platform from PubNub to Stream Chat in minimal time.

Companies typically switch to Stream either from an in-house built messaging solution or from a different third-party chat API because of our:

  • Scalability
  • Performance
  • Stability
  • Advanced features
  • Security
  • Customizable front-end components

Try Stream For Free

Want to see how easy it is to migrate from PubNub Chat to Stream? It only takes about 60 seconds to sign up for an account or reach out, and we'll be happy to help you run a test yourself.

Integrating Video with your App?
We've built a Video and Audio solution just for you. Check out our APIs and SDKs.
Learn more ->