Hi All,
I've got a Spring Boot app that connects to an RDS Aurora instance through the usual spring.datasource property. But I want to now be able to connect to RDS and have access to a read replica. When I added properties for the DB instance and replica support, I got a strange error:code
.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception;code
Does anyone have an example of how to configure the app to hit the master and read-replica?
Thanks.
Les
All,
I am trying to use an Aurora MySQL cluster of 1 writer and 1 read replica.
I set up my properties as follows:
cloud.aws.rds.db-write-instance.username=ABCD
cloud.aws.rds.db-write-instance.password=pass
cloud.aws.rds.db-write-instance.readReplicaSupport=true
cloud.aws.rds-db-write-instance.databaseName=mydb
But when I look at processlist for the writer and read-replica hosts, only the writer has had any activity. Do I need additional configuration set up? This is a Spring Boot app integrated with Spring Cloud for AWS.
Thanks.
(The db instance name matches the master name)
SimpleMessageListernerContainer
. There is an issue related to it spring-cloud/spring-cloud-aws#319
"com.amazonaws.SdkClientException:Unable to find a region via the region provider chain. Must provide an explicit region in the builder or setup environment to supply a region."
when I try to configure a AWSSimpleSystemsManagement client, some one can help me? I have an example in my github for exemplify my problem, follow https://github.com/omundodebob/springcloud-aws-config-poc. Note: The accessKey and secretKey is a fake, just to test this problem :).
I'm trying use the spring-cloud-aws-jdbc in my project, but when I receive a large number of user I have a problem, It seems like my pool of connections is full.
Exception: Pool empty. Unable to fetch a connection in 30 seconds, none available[size:100; busy:100; idle:0; lastwait:30000]
I have used C3P0 in it with no problem. Is possible I use C3P0 for pool connection instead Tomcat pool?
Hey guys ... question to spring-cloud-aws / multiple listeners on one queue
class A{
@SqsListener(value = "some-queue", deletionPolicy = ON_SUCCESS)
public void onMessageReceived1(String payload, @Header(TYPE) String messageType) {}
}
class B {
@SqsListener(value = "some-queue", deletionPolicy = ON_SUCCESS)
public void onMessageReceived2(@Payload SomeMessagePayload message, @Header(TYPE) String messageType) {}
}
would that work? btw. is the Method Name taken into account?
I got "Ambiguous handler methods mapped for destination " when both methods are called "onMessageReceived"
Hi all, When i am using @SqsListener with Object its not getting the value
@SqsListener("Demo")
public void processMessage(Person person) {
System.out.println("Message Received - " + person.getName());
}
I get the value - Message Received - null
When i debug i can see the GenericMessage payload with actual value. I thought If jackson library is in class path message converstion happens automatically
I have configured QueueMessageHandlerFactory with StrictContentTypeMatch- false
@Bean
public QueueMessageHandlerFactory queueMessageHandlerFactory() {
QueueMessageHandlerFactory factory = new QueueMessageHandlerFactory();
MappingJackson2MessageConverter messageConverter = new MappingJackson2MessageConverter();
//set strict content type match to false
messageConverter.setStrictContentTypeMatch(false);
factory.setArgumentResolvers(Collections.singletonList(new PayloadMethodArgumentResolver(messageConverter)));
return factory;
}