eventsource

Is it ok to use Apache Kafka “infinite retention policy” as a base for an Event sourced system with CQRS?

倾然丶 夕夏残阳落幕 提交于 2019-12-22 11:37:33
问题 I'm currently evaluating options for designing/implementing Event Sourcing + CQRS architectutral approach to system design. Since we want to use Apache Kafka for other aspects (normal pubsub messaging + stream processing), the next logical question would be, "Can we use the Apache Kafka store as event store for CQRS"?, or more importantly would that be a smart desition? Right now I'm unsure about this. This source seems to support it: https://www.confluent.io/blog/okay-store-data-apache-kafka

Detecting end of Flux data v.s. error

徘徊边缘 提交于 2019-12-21 05:14:39
问题 Currently looking at SSE using Angular 5 and Spring 5 webflux. The basic application is working correctly, but whilst investigating error handling we've noticed that the EventSource in the angular application doesn't see any difference between spring closing the connection due to reaching the end of the Flux stream of data, and an error occuring (e.g. terminating the application mid transfer). The examples we've based our investigations on are the following. https://thepracticaldeveloper.com

server sent events (eventsource) with standard asp.net mvc causing error

一世执手 提交于 2019-12-17 07:34:09
问题 I am trying my hand at server-sent events, but I cannot get it to work within an MVC project (not WebAPI). I haven't found any good samples online. This is the server-side code I tried (including several failed attempts from various posts): Function GetRows() as ActionResult Dim ret = New HttpResponseMessage ' ret.Content.w ' Return ret Response.ContentType = "text/event-stream" Response.Write("data: " & "aaaa") Dim flag = False If flag Then For i = 0 To 100 Response.Write("data: " & i) Next

Eventsource API : EXCEPTION: No activity within 300000 milliseconds. Reconnecting

我的未来我决定 提交于 2019-12-13 04:22:54
问题 I am using eventSource API and added the addEventListener() to the eventsouce. The event source is activated till only 45 seconds. I want to keep the connection alive until the server send the response back to client. Now, I am getting the below exception because there is no response back from the server till 45 secs. EXCEPTION: No activity within 300000 milliseconds. Reconnecting. Please give me some pointers to make the connection alive/ any other approach to achieve it. 回答1: The solution

What HTTP Method does EventSource use to open a connection?

前提是你 提交于 2019-12-13 03:57:19
问题 While in other questions people claimt EventSource is fairly well documented I have found it to be more implied then explicit in some cases. My understanding is that when you initialise an EventSource object in JS it opens a connection to your server using the specified URI. Is this connection initiated using GET? (Not sure if this constitutes a second question) Is it possible to use/force another HTTP Method (POST)? 回答1: The request method when using the EventSource interface is a GET

Named event stream with Play 2.5 and server sent events

二次信任 提交于 2019-12-12 04:02:54
问题 Default event name/type in server sent event is "message". I am trying to change the event name but it is not working. I am using Play 2.5 and akka streams. (actorRef,sourcePublisher)= Source .actorRef[T](10, OverflowStrategy.fail) .toMat(Sink.asPublisher(true))(Keep.both) .run() backsource = Source.fromPublisher[T](sourcePublisher).named("test1") Ok.chunked(backsource via EventSource.flow) .as(ContentTypes.EVENT_STREAM) But it is not changing the event name/type. It is still listening to

Server-side-event C++ implementation?

北城余情 提交于 2019-12-11 13:07:30
问题 I'm trying to implement a C++ server to generate event for a javascript EventSource, I'm building it with cpprest. From the examples I've seen in PHP or Node.js, it looked pretty straight-forward but I must be missing something since I'm getting this in the Firefox console: Firefox can’t establish a connection to the server at http://localhost:32123/data. With Postman, I'm correctly receiving "data : test" so I think I'm missing some continuation, probably have to do something more than just

EventSource: always getting error

吃可爱长大的小学妹 提交于 2019-12-11 05:32:37
问题 To get start with EventSource API I wrote the most scholastic example. The problem is that I'm always getting error and I can't find any useful information about it. When I load home.html , the JS script stops at source.onerror ; I print it into the console but analyzing the object I can't find any error type or message so I have no idea of what it's wrong. Is there an error in the code? Could be an error related to the server? home.html <body> <div id="result"></div> <script src="sse.js"><

Is it reliable to use EventSource to get User's online status?

╄→гoц情女王★ 提交于 2019-12-07 13:57:47
问题 I have used an EventSource method to get online status of active users on my website. In this following JavaScript code is inserted in every page var source = new EventSource("set_online.php"); Thus this code is executing set_online.php file continuously. On server side i.e. in set_online.php following code executed $query = "UPDATE my_db SET last_active = '{$current_time}' WHERE id = {$_SESSION["id"]}"; $result = mysqli_query($connection, $query); Now I have two concerns about this: As

Angular2/typescript and SSE (EventSource)

天涯浪子 提交于 2019-12-07 05:04:36
问题 First of all, I`m quite new to ng2 and typescript. What Im trying to accomplish is to implement Server-Sent events in Angular2 component. I have followed the examples mentioned in earlies posts here, but my problem is that the "EventSource" object is unrecognized (red underline, in VS Code). Im not sure if I`m missing some references... My references are: <!-- IE required polyfills, in this exact order --> <script src="node_modules/es6-shim/es6-shim.min.js"></script> <script src="node_modules