ably.io 1.2.17

dotnet add package ably.io --version 1.2.17
                    
NuGet\Install-Package ably.io -Version 1.2.17
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ably.io" Version="1.2.17" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ably.io" Version="1.2.17" />
                    
Directory.Packages.props
<PackageReference Include="ably.io" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ably.io --version 1.2.17
                    
#r "nuget: ably.io, 1.2.17"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ably.io@1.2.17
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ably.io&version=1.2.17
                    
Install as a Cake Addin
#tool nuget:?package=ably.io&version=1.2.17
                    
Install as a Cake Tool

Ably Pub/Sub Dotnet Header NuGet version License

Ably Pub/Sub .NET SDK

Build any realtime experience using Ably’s Pub/Sub .NET SDK. Supported on all popular platforms and frameworks, including Unity and MAUI.

Ably Pub/Sub provides flexible APIs that deliver features such as pub-sub messaging, message history, presence, and push notifications. Utilizing Ably’s realtime messaging platform, applications benefit from its highly performant, reliable, and scalable infrastructure.

Find out more:


Getting started

Everything you need to get started with Ably:


Supported platforms

Platform Support
.NET Standard 2.0+
.NET 6.0+, .NET Core 2.0+
.NET Framework 4.6.2+
Mono 5.4+
Xamarin.Android 8.0+
Xamarin.iOS 10.14+
Xamarin.Mac 3.8+
Unity 2019.x+
MAUI .NET 6.0+

SDK versions < 1.2.12 will be deprecated from November 1, 2025.


Installation

The SDK is available as a nuget package. To get started with your project, install the package from the Package Manager Console or the .NET CLI.

Package Manager Console:

PM> Install-Package ably.io

.NET CLI in your project directory:

dotnet add package ably.io

MAUI configuration

When using Ably in a MAUI project, be aware of potential issues caused by assembly trimming, as ably-dotnet relies on the reflection API.

Add the following to your .csproj file to prevent trimming of the IO.Ably assembly:

<ItemGroup>
  <TrimmerRootAssembly Include="IO.Ably" />
</ItemGroup>

Usage

The following code connects to Ably's realtime messaging service, subscribes to a channel to receive messages, and publishes a test message to that same channel:

// Initialize Ably Realtime client
var realtime = new AblyRealtime("your-ably-api-key");

// Wait for connection to be established
realtime.Connection.On(ConnectionEvent.Connected, args =>
{
   Console.WriteLine("Connected to Ably");
});

// Get a reference to the 'test' channel
IRealtimeChannel channel = realtime.Channels.Get("test");

// Subscribe to all messages published to this channel
channel.Subscribe(message =>
{
   Console.WriteLine($"Received message: {message.Data}");
});

// Publish a test message to the channel
await channel.PublishAsync("test-event", "Hello World!");

Enable logging using a new class that implements ILoggerSink interface.

class CustomLogHandler : ILoggerSink
{
    public void LogEvent(LogLevel level, string message)
    {
        Console.WriteLine($"Handler LogLevel : {level}, Data :{message}");
    }
}

Update clientOptions for LogLevel and LogHandler.

clientOpts.LogLevel = LogLevel.Debug;
clientOpts.LogHandler = new CustomLogHandler();

Unity usage

  • Download latest ably.io.*.unitypackage from releases section and include it in the unity project.
  • For more information, check Unity README

Releases

The CHANGELOG.md contains details of the latest releases for this SDK. You can also view all Ably releases on changelog.ably.com.


Contributing

Read the CONTRIBUTING.md guidelines to contribute to Ably.


Support, feedback and troubleshooting

For help or technical support, visit Ably's support page or GitHub Issues for community-reported bugs and discussions.

Increasing transport send and receive buffers for .NET framework

In high-throughput scenarios, for example, sending messages >50KB, the default WebSocket buffer in the .NET Framework can cause instability or errors. This issue is discussed in GitHub issue #446.

To mitigate this, increase the WebSocket buffer size to the maximum allowed (64KB):

var maxBufferSize = 64 * 1024;

var options = new ClientOptions();
var websocketOptions = new MsWebSocketOptions
{
    SendBufferInBytes = maxBufferSize,
    ReceiveBufferInBytes = maxBufferSize
};

options.TransportFactory = new MsWebSocketTransport.TransportFactory(websocketOptions);

var realtime = new AblyRealtime(options);
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net46 is compatible.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid is compatible. 
MonoMac monomac was computed. 
MonoTouch monotouch is compatible. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios is compatible. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on ably.io:

Package Downloads
Ubiq.SportXAPI

A .NET wrapper library for the SX BET exchange API

Ably.Healthcheck

Healthcheck for Ably.io services

ably.io.push.android

Ably .NET library to enable push notifications on Android devices. This package provides Android-specific push notification functionality using Firebase Cloud Messaging for the Ably realtime messaging platform.

ably.io.push.ios

Ably .NET library to enable push notifications on iOS devices. This package provides iOS-specific push notification functionality for the Ably realtime messaging platform.

LemonMarketsApiSharp

A C# client to interact with the Lemon Markets Stocks & ETF API.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.17 712 11/12/2025
1.2.16 4,026 10/14/2025
1.2.15 843,531 4/19/2024
1.2.14 240,282 10/23/2023
1.2.13 30,922 9/26/2023
1.2.12 76,973 7/2/2023
1.2.11 10,994 5/23/2023
1.2.10 88,260 1/28/2023
1.2.9 29,311 8/31/2022
1.2.8 77,145 4/21/2022
1.2.7 17,102 1/28/2022
1.2.6 5,608 1/12/2022
1.2.5 31,038 7/7/2021
1.2.4 50,085 5/5/2021
1.2.3 143,648 11/3/2020
1.2.2 2,603 9/24/2020
1.2.1 7,843 6/12/2020
1.1.20 35,769 4/24/2020
1.1.19 3,977 3/25/2020
1.1.18 1,249 3/10/2020
1.1.15-beta1 806 11/1/2019
1.1.14 69,482 10/4/2019
1.1.13 4,921 8/21/2019
1.1.12 1,144 7/31/2019
1.1.11 1,498 7/23/2019
1.1.10 2,162 7/3/2019
1.1.9-beta1 669 6/19/2019
1.1.8 1,862 6/7/2019
1.1.7-beta1 721 5/24/2019
1.1.6 13,538 5/24/2019
1.1.5 1,286 5/20/2019
1.1.4 1,086 5/18/2019
1.1.3 1,055 5/17/2019
1.1.2 1,639 5/1/2019
1.1.1 2,858 4/25/2019
1.1.0 1,490 4/9/2019
1.1.0-beta1 1,052 2/15/2019
0.8.11 33,031 5/18/2018
0.8.10 1,887 5/2/2018
0.8.9 5,663 2/21/2018
0.8.8 9,393 2/6/2018
0.8.7 4,133 12/22/2017
0.8.6 7,638 11/28/2017
0.8.6-beta4 1,198 11/24/2017
0.8.6-beta3 1,403 10/30/2017
0.8.5 16,645 9/5/2017
0.8.5-rc3 1,490 9/6/2017
0.8.5-rc2 1,467 8/18/2017
0.8.5-rc1 1,568 8/16/2017
0.8.5-beta9 1,692 7/10/2017
0.8.5-beta8 1,343 6/29/2017
0.8.5-beta7 2,209 6/16/2017
0.8.5-beta6 4,444 5/10/2017
0.8.5-beta5 1,331 5/1/2017
0.8.5-beta4 1,626 5/1/2017
0.8.5-beta3 1,542 4/26/2017
0.8.5-beta2 1,541 4/26/2017
0.8.5-beta18 1,349 8/13/2017
0.8.5-beta17 1,359 8/11/2017
0.8.5-beta16 1,449 8/8/2017
0.8.5-beta15 1,530 8/4/2017
0.8.5-beta14 1,585 8/3/2017
0.8.5-beta13 1,278 8/3/2017
0.8.5-beta12 1,630 7/18/2017
0.8.5-beta11 1,711 7/12/2017
0.8.5-beta1 1,561 2/6/2017
0.8.4.8 3,116 8/1/2017
0.8.4.7 2,365 6/29/2017
0.8.4.6 1,935 6/20/2017
0.8.4.4 1,969 5/27/2017
0.8.4.3 2,099 5/19/2017
0.8.4.2 8,073 4/7/2017
0.8.4.1 6,797 3/3/2017
0.8.4 2,637 1/14/2017
0.8.4-rc1 1,478 11/8/2016
0.8.3 6,815 6/27/2016
0.8.2-Beta 1,852 6/10/2016
0.8.1-Beta 1,263 5/25/2016