Skip to content
This repository has been archived by the owner on Oct 13, 2018. It is now read-only.

Razenpok-Graveyard/Razensoft.Faktory

Repository files navigation

THIS PROJECT IS NOT SUPPORTED. Feel free to fork or whatever.

Razensoft.Faktory

.NET implementation of Faktory worker and client

Installation

Nuget package TBD. For now you need to compile it yourself.

Usage

Use FaktoryClient for job creation

using Razensoft.Faktory;
...
var client = new FaktoryClient
{
    Password = "pass"
};
await client.ConnectAsync("127.0.0.1");
await client.PublishAsync(new Job
{
    Type = "TestJob",
    Id = Guid.NewGuid().ToString(),
    Args = new object[] { 1, 2, "Hello"}
});

And FaktoryWorker for job consumption

using Razensoft.Faktory;
...
var worker = new FaktoryWorker
{
    Password = "pass",
    SubscribedQueues = { "default" }
};
worker.Register("TestJob", TestJob);
await worker.ConnectAsync("127.0.0.1");
await worker.RunAsync();
...
private static void TestJob(object[] args)
{
    throw new NotImplementedException();
}

About

.NET implementation of Faktory worker and client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages