Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using DotNetCore.CAP;
using Microsoft.Extensions.Logging;
namespace CAPDemo
{
public class HelloWorldReceiver : ICapSubscribe
{
private readonly ILogger<HelloWorldReceiver> _logger;
public HelloWorldReceiver(ILogger<HelloWorldReceiver> logger)
{
_logger = logger;
}
[CapSubscribe("helloWorld")]
public void Handle(string value)
{
_logger.Log(LogLevel.Debug, value);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.