kestrel

Simple Pull Message Queue

江枫思渺然 提交于 2019-12-23 15:28:42
问题 I'm trying to find the right tool for the job. I've explored a few different message queues like Kafka, Kestrel, etc... and I'm looking for something that has a PULL functionality. I have an API (distributed) that shoves the incoming messages into the queue. I'd then have workers (separate machines) that pull messages from the queue. This ensures that the workers don't get flooded and can't handle the load of the queue. I'm wondering if Kafka or Kestrel supports this type of functionality 回答1

What's the difference between HttpContext.RequestAborted and CancellationToken parameter?

亡梦爱人 提交于 2019-12-20 01:45:15
问题 I'm trying to create an async view component for ASP.NET Core 2.0 . It will do an action that should be cancelled when the user navigates away from the page. I've got the following options: Using the HttpContext.RequestAborted Using a CancellationToken parameter I could also chain the tokens Option 1 looks like this: public class AmazingMessageViewComponent : ViewComponent { public async Task<IViewComponentResult> InvokeAsync(string text, int wait) { //uses request aborted await Task.Delay

Java client library for reading from Kestrel server Queue from within Storm Spout

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 19:45:20
问题 I've setup a Kestrel server and able to setup and use queues via the python pykestrel library. We have a scenario where a python client writes to Kestrel queue(s) and a Storm spout needs to read from the queue(s). I've tried using the storm-kestrel library but running into issues. Googling seems to suggest it doesn't support the memcache port (22133). I've added the maven bindings as provided here. Didn't use the KestrelThriftSpout spout, using Kestrel.Client. Compilation is fine but I get

JWT Bearer - Token Validation Parameter for each port .Net Core Kestral

落爺英雄遲暮 提交于 2019-12-11 14:17:32
问题 I am working on a MultiTennat SaaS applicaiton in .Net Core + Kestral + Reverse Proxy with Apache on Linux. My application will start on multiple ports: http://localhost:50001 http://localhost:50002 ... http://localhost:5000(n) Each port, as shown above, will be linked to a fully qualified domain name which will be accessed by different customer. http://localhost:50001 <--> www.customer1.com http://localhost:50002 <--> www.customer2.com ... http://localhost:5000(n) <--> www.customer(n).com

Get original URL after rewriting in Kestrel

我是研究僧i 提交于 2019-12-11 07:32:36
问题 Apache would choose a file to serve based on rewritten URL, but the original URL would be passed to the script. Kestrel passes the rewritten URL down the pipeline (accessible via HttpContext.Request.Path ). Is it possible to access original URL from Middleware after it has been rewritten? 回答1: Following the direction issued by @Tseng. My test wraps the RewriteMiddleware, but you may want a separate middleware. public class P7RewriteMiddleware { private RewriteMiddleware

Can't cancel task in Asp.net core Action

允我心安 提交于 2019-12-10 13:15:17
问题 I am trying to cancel Task running in Asp.net Core Action. For that I am using this github sample. I can cancel task if running service in console, but if I run under IIS (or IIS Express) task is not canceling. I saw similar issue in other question. Based on it issue should be fixed already. I am using .Net core 2.1. 回答1: As I know this is known issue and doesn't fixed yet. See more details on ANCM project page. 来源: https://stackoverflow.com/questions/50702303/cant-cancel-task-in-asp-net-core

Access environment name in Program.Main in ASP.NET Core

。_饼干妹妹 提交于 2019-12-09 14:00:11
问题 Using ASP.NET Mvc Core I needed to set my development environment to use https, so I added the below to the Main method in Program.cs: var host = new WebHostBuilder() .UseContentRoot(Directory.GetCurrentDirectory()) .UseIISIntegration() .UseStartup<Startup>() .UseKestrel(cfg => cfg.UseHttps("ssl-dev.pfx", "Password")) .UseUrls("https://localhost:5000") .UseApplicationInsights() .Build(); host.Run(); How can I access the hosting environment here so that I can conditionally set the protocol

How do you set up two microservices that both use https port?

依然范特西╮ 提交于 2019-12-08 21:08:30
I have one microservice that is a Asp.Net Core stateless service. The service runs fine and i can access at https://myazureresource.eastus.cloudapp.azure.com/controller/method . My ServiceManifest.xml is: <Resources> <Endpoints> <Endpoint Protocol="https" Name="EndpointHttps" Type="Input" Port="443" /> </Endpoints> </Resources> And MyService.cs is: protected override IEnumerable<ServiceInstanceListener> CreateServiceInstanceListeners() { return new ServiceInstanceListener[] { new ServiceInstanceListener(serviceContext => new KestrelCommunicationListener(serviceContext, "EndpointHttps", (url,

How do you set up two microservices that both use https port?

随声附和 提交于 2019-12-08 04:59:00
问题 I have one microservice that is a Asp.Net Core stateless service. The service runs fine and i can access at https://myazureresource.eastus.cloudapp.azure.com/controller/method. My ServiceManifest.xml is: <Resources> <Endpoints> <Endpoint Protocol="https" Name="EndpointHttps" Type="Input" Port="443" /> </Endpoints> </Resources> And MyService.cs is: protected override IEnumerable<ServiceInstanceListener> CreateServiceInstanceListeners() { return new ServiceInstanceListener[] { new

Build a .NET core application while running Kestrel server

▼魔方 西西 提交于 2019-12-08 02:51:49
问题 In classic .NET applications, I'd set up my local IIS to run the specified application. I could build the application and hit the endpoint to see the change immediately. I did not need to launch the debugger every time. I want to achieve this with .NET core using Kestrel server. I'm able to run my application by running dotnet run from the command line. However, when I try to build, the files are in use and the build fails. Are there any development configuration options that do not lock down