Skip to content

jmarbutt/HangFire.TopicExtensions

Repository files navigation

HangFire.TopicExtensions

Setup

Place this snipped in your ConfigureServices

 services
    .AddHangfire(x =>
        x
            .UseSqlServerStorage(
                "<connection>")
            .UseTopics()
    );

services.AddHangfireServer();
services.AddTopicServices();

Example Sending Topic

topicPublisher.EnqueueTopic("topic1");

topicPublisher.EnqueueTopic("topic1", someParams);

Example Subscriber

    [SubscriberJob("topic1")]
    public class SampleSubscriber : ISubscriber
    {
        private readonly IConfiguration _config;

        public SampleSubscriber(IConfiguration config)
        {
            _config = config;
        }
        public void Execute(object context)
        {
            
        }
    }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages