.NET / C#
Install
Section titled “Install”dotnet add package HonkerThe .NET package wraps Microsoft.Data.Sqlite and loads the Honker extension.
using Honker;
using var db = Database.Open("app.db", new OpenOptions{ ExtensionPath = "./libhonker_ext.dylib", WatcherBackend = "shm",});var q = db.Queue("emails");q.Enqueue(new { To = "alice@example.com" });
var job = q.ClaimOne("worker-1");if (job is not null){ job.Ack();}Transactional Outbox
Section titled “Transactional Outbox”var outbox = db.Outbox("email", async payload =>{ await SendEmail(payload);});
using (var tx = db.BeginTransaction()){ tx.Execute("INSERT INTO orders (id, total) VALUES (@p0, @p1)", 42, 9900); outbox.Enqueue(new { OrderId = 42 }, transaction: tx); tx.Commit();}
await outbox.RunWorker("email-worker");ORM Section
Section titled “ORM Section”If your app uses Microsoft.Data.Sqlite directly, share the same
SqliteConnection and transaction. With EF Core, Honker does not ship an EF
provider; keep a small wrapper that executes Honker SQL through the same
connection/transaction EF is using, or move enqueue-critical writes into an
explicit SQLite transaction.
See the full .NET ORM recipe for connection-sharing examples.
Testing
Section titled “Testing”Use temporary files and subprocess queue workers for watcher backend tests. That catches native extension loading, SHM reopen behavior, and wake delivery across real .NET processes.