microservices

Spring Cloud Netflix Eureka doesn't find eureka-js instances

女生的网名这么多〃 提交于 2019-12-11 06:56:04
问题 I have 3 microservices in Spring: Netflix Eureka A Producer A Consumer And another microservice written in NodeJs with Eureka-js-client node-microservice Spring Eureka dashboard lists all of them Until now everything looks OK, but the problem is when I try to read my node-microservice instance in eureka server. While I successfully find employee-producer instance in this way List<ServiceInstance> instances=discoveryClient.getInstances("employee-producer"); ServiceInstance serviceInstance

Micro-services, client-side discovery

前提是你 提交于 2019-12-11 06:48:28
问题 I am new to microservices, so while reading about it,I can't understand the below paragraph when talking about the load balancing, how the client will do something like this? "When using client‑side discovery, the client is responsible for determining the network locations of available service instances and load balancing requests across them. " 回答1: A Microservice architecture involves a number of services that may have hierarchical dependencies. For example, Service A depends on Service B

How to register spring boot microservices on spring cloud Netflix eureka?

眉间皱痕 提交于 2019-12-11 06:18:01
问题 We were planning to use spring cloud Netflix oss components. So I was doing a small sample project. I developed 2 spring microservices and those services runs well on http://localhost:9000/microsvc-one http://localhost:9001/microsvc-two And also wrote a sample spring cloud etflix eureka maven project which runs well on http://localhost:8761 I used annotations @EurekaDiscoveryClient and @SpringBootApplication on both the spring boot microservices main class I used annotation

What asp.net Core project for MicroService without endpoint

若如初见. 提交于 2019-12-11 06:17:49
问题 I am looking at taking the Docker plunge with a Microservices Framework. I have seen numerous examples of exposing an endpoint to be called by something to do something (get me the weather at a location, the exchange rate for currency, etc). I have not seen anything that talks about how to replace my current Windows Service type applications or applications that subscribe to queues to do their work. For Example, lets say I have a windows service that every day at 2:00 AM zips all of the files

Should I ignore the guidance and avoid putting validation in the command objects?

妖精的绣舞 提交于 2019-12-11 05:59:50
问题 I am using CQRS. Everywhere I read tells me to put validation logic in the command objects. For example, see this link: https://lostechies.com/jimmybogard/2016/04/29/validation-inside-or-outside-entities/ Please see the command below (taken from the link): public class ChangeNameCommand { [Required] public string FirstName { get; set; } [Required] public string LastName { get; set; } } and the Business Object below (also taken from the link - note that I have changed the the parameter passed

How to create a Micro Frontend bundle with Webpack that shares libraries with the container application?

China☆狼群 提交于 2019-12-11 05:53:44
问题 I have a task. To have Micro Frontends with single-spa framework. portal/main application (which load all other js code by url) Micro Frontend 1 (react based) Micro Frontend 2 (react based) So my problem just one: I don't want to duplicate vendor libraries like react, react-dom (any others). And I want to make them shared among other Micro Frontends (which is bundled with webpack) I know what is the bad practice to have some global stuff (it's violate the whole idea of bundeling with webpack)

Why does the RetryScheduler in Axon Framework not retry after a NoHandlerForCommandException?

我们两清 提交于 2019-12-11 05:03:53
问题 so I have a Saga and the Saga sends a command to a different microservice on a specific event. I wanted to configure the commandGateway with a RetryScheduler, so that it retries to send the command in case that the other microservice is down. The RetryScheduler will only perform retries if the exception is a RuntimeException, which the NoHandlerForCommandException that is thrown when the other service if offline definately is. If i dont set the maxRetryCount then the error message is o.a.c

How to track session across several web apps, multiple microservices

梦想的初衷 提交于 2019-12-11 04:13:02
问题 I would like to track a session across multiple web applications, multiple microservices. All of my web applications are static files and microservices are running under nodejs containers with Kubernetes. I have tracking setup across separate web applications and separate microservices. But it too cumbersome to merge and view everything in a single view. Is there any approach to view all of them under single session? 回答1: Kubernetes itself do not support any request tracing, but you can use

How to rollback distributed transactions?

寵の児 提交于 2019-12-11 04:09:25
问题 I have three different Spring boot Projects with separated databases e.g account-rest, payment-rest, gateway-rest. account-rest : create a new account payment-rest : create a new payment gateway-rest : calls other endpoints at gateway-rest there is an endpoint which calls the other two endpoints. @GetMapping("/gateway-api") @org.springframework.transaction.annotation.Transactional(rollbackFor = RuntimeException.class) public String getApi() { String accountId = restTemplate.getForObject("http

How to manage microservice failure?

旧巷老猫 提交于 2019-12-11 03:41:27
问题 Let's say, I have several micro-services (REST API), the problem is, if one service is not accessible (let's call service "A" ) the data which was sending to service "A" will be saved in temporary database. And after service worked, the data will be sent again. Question: 1. Should I create the service which pings to service "A" in every 10 seconds to know service works or not? Or is it possible to do it by task queue? Any suggestions? 回答1: Polling is a waste of bandwidth. You want to use a