diff --git a/samples/Sample.Kafka/Controllers/ValuesController.cs b/samples/Sample.Kafka/Controllers/ValuesController.cs new file mode 100644 index 0000000..ffd201c --- /dev/null +++ b/samples/Sample.Kafka/Controllers/ValuesController.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Cap.Consistency.Attributes; +using Cap.Consistency.Consumer; +using Microsoft.AspNetCore.Mvc; + +namespace Sample.Kafka.Controllers +{ + [Route("api/[controller]")] + public class ValuesController : Controller, IConsumerService + { + + [KafkaTopic("zzwl.topic.finace.callBack", IsOneWay = true)] + public void KafkaTest() { + Console.WriteLine("kafka test invoked"); + } + } +}