---
source_url: https://www.pubnub.com/docs/sdks/c-core/faq
title: FAQ for C-Core SDK
updated_at: 2026-06-02T11:33:18.535Z
sdk_name: PubNub C/C++ Core SDK
sdk_version: 7.2.3
---

> Documentation Index
> For a curated overview of PubNub documentation, see: https://www.pubnub.com/docs/llms.txt
> For the full list of all documentation pages, see: https://www.pubnub.com/docs/llms-full.txt


# FAQ for C-Core SDK

PubNub C/C++ Core SDK, use the latest version: 7.2.3

Check out the frequently asked questions about the PubNub C-Core SDK.

## Why is a user ID required?

The user ID uniquely identifies the client (end user, device, or server). Set and persist a stable value for the lifetime of the user or device; without it, the client cannot connect.

## Can I publish and subscribe with a single context?

Yes, but not at the same time. To publish and subscribe concurrently, use separate contexts or a pool for publishing.

## How do I choose static vs dynamic buffers?

Use static buffers when memory is tight and message sizes are predictable. Use dynamic buffers for large or variable replies. Review `PUBNUB_DYNAMIC_REPLY_BUFFER` and `PUBNUB_REPLY_MAXLEN`.

## What happens if the transaction timer expires?

The SDK cancels the transaction locally and returns `timeout`. Publishes that already reached the server are not rolled back.

## Is the C-Core SDK thread safe?

Yes when compiled with thread-safety enabled, but you must still synchronize your own application data. Without thread safety, use one thread per context.

## How do I reduce memory footprint?

Lower the number of contexts, use static buffers, disable proxy support and other unused modules, and enable `PUBNUB_ONLY_PUBSUB` if you only need publish/subscribe.

## Can I change the origin (DNS host) at runtime?

Yes if `PUBNUB_ORIGIN_SETTABLE` is enabled. Passing `NULL` resets the origin to the default.

## What are the default retry settings for subscribe?

Exponential backoff with up to 6 retries, increasing delays from 2 to 150 seconds.

## Why am I missing subscribe messages?

Static reply buffers may truncate large responses, and long gaps can advance the subscribe cursor. Increase `PUBNUB_REPLY_MAXLEN` or review your subscribe loop configuration.

## Which encryption should I use?

Prefer 256-bit AES-CBC. Legacy 128-bit encryption remains available for backward compatibility. See the Encryption docs.

## How do I enable Transport Layer Security (TLS)?

Call the SSL configuration API with TLS enabled to secure all communications with PubNub.

## Can I use the old subscribe functions with the event engine enabled?

No. When `PUBNUB_USE_SUBSCRIBE_EVENT_ENGINE` is `ON`, do not call `pubnub_subscribe` or `pubnub_subscribe_v2`.

## How do I use a proxy?

Enable `PUBNUB_PROXY_API` and configure host, port, and protocol using the proxy APIs.

## Terms in this document

* **PubNub** - PubNub is a real-time messaging platform that provides APIs and SDKs for building scalable applications. It handles the complex infrastructure of real-time communication, including: Message delivery and persistence, Presence detection, Access control, Push notifications, File sharing, Serverless processing with Functions and Events & Actions, Analytics and monitoring with BizOps Workspace, AI-powered insights with Illuminate.