ServiceMq.Sqlite
7.0.0
dotnet add package ServiceMq.Sqlite --version 7.0.0
NuGet\Install-Package ServiceMq.Sqlite -Version 7.0.0
<PackageReference Include="ServiceMq.Sqlite" Version="7.0.0" />
<PackageVersion Include="ServiceMq.Sqlite" Version="7.0.0" />
<PackageReference Include="ServiceMq.Sqlite" />
paket add ServiceMq.Sqlite --version 7.0.0
#r "nuget: ServiceMq.Sqlite, 7.0.0"
#:package ServiceMq.Sqlite@7.0.0
#addin nuget:?package=ServiceMq.Sqlite&version=7.0.0
#tool nuget:?package=ServiceMq.Sqlite&version=7.0.0
ServiceMq
A durable, store-and-forward message queue for .NET
ServiceMq moves typed objects, text, or bytes between .NET processes over named pipes or TCP. A sender writes each message to durable storage before delivery. If the destination is unavailable, ServiceMq retries without making the application manage a retry loop. A receiver can consume immediately or explicitly acknowledge work.
Documentation
The ServiceMq User Guide is the main documentation. Start with:
| If you want to… | Read |
|---|---|
| Send and receive a message in ten minutes | Getting started |
| Choose named pipes, TCP, or both | Addresses and transports |
Understand Receive, Accept, and delivery guarantees |
Messages and delivery |
| Choose file, memory, SQLite, or custom storage | Storage |
| Configure retries and recover failed messages | Retries and dead letters |
| Monitor disk use and repair bad records | Operations |
| Protect data and deploy safely | Security |
| Upgrade an older ServiceMq application | Migrating to 7.0 |
| Diagnose a problem | Troubleshooting |
Install
dotnet add package ServiceMq --version 7.0.0
For SQLite storage:
dotnet add package ServiceMq.Sqlite --version 7.0.0
Both packages target netstandard2.0 and net8.0. ServiceMq 7 uses ServiceWire 7.0.
Quick start
Create one address and queue per process. This example uses named pipes because both queues are on the same machine:
using ServiceMq;
var ordersAddress = new Address("orders-pipe");
using var orders = new MessageQueue(
name: "orders",
address: ordersAddress,
msgDir: @"C:\service-data\orders");
using var checkout = new MessageQueue(
name: "checkout",
address: new Address("checkout-pipe"),
msgDir: @"C:\service-data\checkout");
Guid id = checkout.Send(ordersAddress, new OrderPlaced
{
OrderId = 42,
Total = 19.95m
});
Message message = orders.Receive(timeoutMs: 5_000);
if (message != null)
{
OrderPlaced order = message.To<OrderPlaced>();
Console.WriteLine($"Received {message.Id}: order {order.OrderId}");
}
public sealed class OrderPlaced
{
public int OrderId { get; set; }
public decimal Total { get; set; }
}
Send returns after the outgoing message is stored, not necessarily delivered.
Receive removes the incoming record before returning it. Use Accept followed by
Acknowledge when work must remain recoverable until processing finishes:
Message message = orders.Accept(timeoutMs: 5_000);
if (message != null)
{
try
{
await HandleOrder(message.To<OrderPlaced>());
orders.Acknowledge(message);
}
catch
{
orders.ReEnqueue(message);
throw;
}
}
Production configuration
The original constructor remains supported. MessageQueueOptions exposes the complete
configuration surface:
var queue = new MessageQueue(new MessageQueueOptions
{
Name = "orders",
Address = new Address("orders-pipe"),
VisibilityTimeout = TimeSpan.FromMinutes(1),
Storage = new StorageOptions
{
RootPath = @"D:\service-data\orders",
Durability = DurabilityMode.FlushToDisk,
MaxBytes = 10L * 1024 * 1024 * 1024,
MaxMessages = 1_000_000,
FullBehavior = QueueFullBehavior.Reject,
SentRetention = TimeSpan.FromDays(2),
ReadRetention = TimeSpan.FromHours(12),
DeadLetterRetention = TimeSpan.FromDays(30),
SentAuditPayload = AuditPayloadMode.MetadataOnly,
ReadAuditPayload = AuditPayloadMode.MetadataOnly
},
Delivery = new DeliveryOptions
{
MaxConcurrentDestinations = 8,
MaxAttempts = 100,
MaxAge = TimeSpan.FromDays(1),
InitialRetryDelay = TimeSpan.FromSeconds(1),
MaximumRetryDelay = TimeSpan.FromMinutes(1),
RetryBackoffFactor = 1.5
}
});
See Storage for every option and provider.
What ServiceMq guarantees
- Outgoing and incoming records are stored before their respective RPC calls return.
- Delivery is at least once. A crash in the final acknowledgment window can produce
a duplicate, so consumers should treat
Message.Idas an idempotency key. - Messages sent by one
MessageQueueare delivered FIFO per destination, including after an outage or restart. Concurrent sends are ordered when they enter the durable outbound queue; ordering does not span separate sender processes. - File records use atomic replacement and malformed records are quarantined.
- Legacy
.omqand.imqrecords remain readable.
ServiceMq is an embedded queue library, not a clustered broker. It does not provide distributed consensus, competing-consumer coordination across several processes, or exactly-once side effects.
Storage providers
| Provider | Package | Best for |
|---|---|---|
FileMessageStore |
ServiceMq |
Durable queues with minimal infrastructure |
MemoryMessageStore |
ServiceMq |
Tests and deliberately transient queues |
SqliteMessageStore |
ServiceMq.Sqlite |
Indexed, transactional storage in one database file |
IMessageStore |
Your assembly | Application-specific storage engines |
Project status
ServiceMq 7.0 targets .NET Standard 2.0 and .NET 8.0 and uses ServiceWire 7.0. The test suite covers named pipes, TCP, restart compatibility, capacity policies, visibility timeouts, dead-letter replay, encryption, corruption quarantine, and all built-in storage providers.
Licensed under the Apache License 2.0.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 is compatible. 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 | 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 was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Data.Sqlite (>= 8.0.29)
- ServiceMq (>= 7.0.0)
-
net8.0
- Microsoft.Data.Sqlite (>= 8.0.29)
- ServiceMq (>= 7.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 7.0.0 | 43 | 8/19/2026 |