microservices

org.springframework.security.oauth2.common.exceptions.InvalidGrantException: Bad credentials

不羁的心 提交于 2019-12-06 21:38:29
I'm developing Spring Boot + Authorization Server + OAuth Resource Server . In this example I can easily query though postman over spring-microservices-oauth-server and get the protected data. I created the client to access the data which postman is doing. But I am getting below error, which doesn't get clear to me. Using Spring Boot v2.1.1.RELEASE and spring-cloud-dependencies version Greenwich.RC2 . Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is error="access_denied", error_description="Access token

Microservices async operation HTTP response

痴心易碎 提交于 2019-12-06 14:09:55
问题 We're building a microservice app where clients can create projects . The following diagram shows the technical flow of this process: My question: what HTTP response should the API gateway return to the client (step 1.)? My initial idea was to give back a 202, but the problem there is that I don't know the Location yet ( /projects/{id} ), because the id of the project will be created at the Project Management Service. 回答1: Considering that the IDs of the newly created project entity is not

is kafka reliable when used as a message bus in micro services

跟風遠走 提交于 2019-12-06 13:32:57
I am using kafka as a message bus for Micro Service architecture, hence multiple services listen on a topic for a message. Therefore, the services are highly dependent on the topic to be live. But, there are many instances where I get leader not available , broker not available and leader= - 1 on the topics. Now, I am not sure if I can rely on the kafka topics, as services get interrupted when there are issues on the topics with cause issues in the platform. Can someone throw some light on the reliability and dependability on the topics and can we recover if we can across the above issues. I

org.glassfish.jersey.server.model.ModelValidationException: Validation of the application resource model has failed during application initialization

◇◆丶佛笑我妖孽 提交于 2019-12-06 12:48:10
问题 I'm developing spring boot microservices example from the link: https://dzone.com/articles/spring-boot-creating. In this project I simply updated the parent dependency to its latest version and other code files are unchanged. I faced the following error when I click http://localhost:8080/order?idCustomer=2&idProduct=3&amount=4 2016-09-09 11:46:20.888 ERROR 14152 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : StandardWrapper.Throwable org.glassfish.jersey.server.model

How to check service-to-service authentication in Google Cloud Endpoints?

陌路散爱 提交于 2019-12-06 12:05:50
问题 I'm trying to split a monolith Google App Engine application (using Python & standard environment) into several services within one application. Default service is calling API implemented using the Endpoints framework in another service. Everything works nicely except that I don't understand how to correctly check authentication of the default service (and make it work both in local development server and in production). To call the service I'm using google-api-python-client and default

Micro Services With Docker Compose: Same Container, Multiple Projects

故事扮演 提交于 2019-12-06 11:16:09
Along with a few others, I am having issues using a micro services architecture of applications and employing docker-compose the way I want to. Summary: I have X micro service projects (lets call these project A , project B and project C . Each micro service depends on the same containers (lets call these dependency D and dependency E . The Problem: Ideally, project A , B and C would ALL have both dependencies ( D & E ) in their docker-compose.yml files; however, this becomes an issue as docker compose sees these as duplicate containers when in reality, I would like to reuse them. Here is an

How to achieve immediate consistency in microservice architecture?

Deadly 提交于 2019-12-06 10:55:10
问题 For example amazon.com; they rely on microservice architecture and probably order and payment are seperate micro services but when you checkout order on amazon.com you can finally see the order id and details.If it's not eventual consistency approach what is it? Maybe 2PC? I'm generalizing my question; what if eventual consistency is not appropriate for business transaction(end user should see the result end of transaction) but seperate microservices is meaningful(like order and payment) how

Hystrix and Turbine does not work with Spring boot 2 and Spring cloud Finchley.M8

你离开我真会死。 提交于 2019-12-06 10:00:31
问题 I tried turbine + hystrix dashboard with Spring boot 2 and latest versions of Spring cloud, seems exist some problem and turbine could not get stream from reactive service. I just uploaded simple microservices to github https://github.com/armdev/reactive-spring-cloud Exception like this: com.netflix.turbine.monitor.instance.InstanceMonitor$MisconfiguredHostException: [{"timestamp":"2018-03-08T17:22:05.809+0000","status":404,"error":"Not Found","message":"No message available","path":"/hystrix

Scaling database in a microservice architecture

£可爱£侵袭症+ 提交于 2019-12-06 08:25:05
Lets say we have 5 microservices (μS) and each microservice requires one database with a few tables. Each of these services needs to be able to scale including the database queries. To do that we have a few options that I know of: 1. 1-μS; 1 instance; 1 DB instance Don't scale horizontally, just vertically. 2. 1-μS; N instances; 1 DB instance Every instance of a service gets to read and write to the same database. Simple way to scale if the service processing is the bottleneck. 3. 1-μS; N instances; HA DB cluster Every instance of a service gets to read and write to the same HA database. Good

What's a valid @MessagePattern for NestJS MQTT microservice?

假如想象 提交于 2019-12-06 07:43:17
问题 I'm trying to setup a MQTT Microservice using NestJS according to the docs. I've started a working Mosquitto Broker using Docker and verified it's operability using various MQTT clients. Now, when I start the NestJS service it seems to be connecting correctly (mqqt.fx shows new client), yet I am unable to receive any messages in my controllers. This is my bootstrapping, just like in the docs: main.ts async function bootstrap() { const app = await NestFactory.createMicroservice(AppModule, {