static void Main(string[] args) { var fm = new FlowmakerConnection(); //var task = fm.GetChannel(new MyJob(), "App.Channels.A"); var channel = fm.GetChannel("App.Channels.A", (msg) => Work(msg)); channel.Send(Encoding.UTF8.GetBytes("Happy Days")); channel.Send(Encoding.UTF8.GetBytes("Today is Monday")); Console.ReadKey(); }
static void Main(string[] args) { var fm = new FlowmakerConnection(); var channel = fm.GetChannel("App.Channels.A"); for (int i = 0; i < 100; i++) { channel.Send(Encoding.UTF8.GetBytes($"Client Message {i}")); } }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { var fm = new FlowmakerConnection(); var channel = fm.GetChannel("App.Channels.A", Work); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapGet("/", async context => { await context.Response.WriteAsync(msg); }); }); }