spring-data-aerospike-starters
spring-data-aerospike-starters copied to clipboard
Help: Setting up Aerospike Cloud
Hi!
I'm trying to perform a database benchmark with Gatling of Aerospike database PoC and is becoming hard to setup the database with spring-boot-starter-data-aerospike-reactive.
As far as I see, aerospike-proxy-client dependency is mandatory to connect with Aerospike Cloud and if I am not wrong, spring-boot-starter-data-aerospike-reactive is not compatible with it, right?
I tried to override aerospikeClient bean to return AerospikeClientProxy with the following example:
Bean(
name = {"aerospikeClient"},
destroyMethod = "close"
)
@ConditionalOnMissingBean({IAerospikeClient.class})
public IAerospikeClient aerospikeProxyClient(AerospikeProperties properties, ClientPolicy aerospikeClientPolicy) {
Host[] hosts = Host.parseHosts(properties.getHosts(), properties.getDefaultPort());
EventPolicy eventPolicy = new EventPolicy();
EventLoopGroup group = new NioEventLoopGroup(1);
aerospikeClientPolicy.eventLoops = new NettyEventLoops(eventPolicy, group, EventLoopType.NETTY_NIO);
aerospikeClientPolicy.tlsPolicy = new TlsPolicy();
return AerospikeClientFactory.getClient(aerospikeClientPolicy, true, hosts);
}
and when I run the Spring Boot app, I got this exception:
com.aerospike.client.AerospikeException: Error -1: Method not supported in proxy client: info
I'm doing something wrong? Maybe I misunderstood something.
Thanks in advance.
Do not hesitate to ask me for more information.
Hi @ind3x, thanks for showing interest in Spring Data Aerospike Starters.
At the moment Spring Data Aerospike doesn't support AerospikeProxyClient which was introduced in Aerospike 7.0 (even if you override the aerospike client with your own AerospikeClientProxy custom bean).
We are aware of this and working to support AerospikeClientProxy in the next release of Spring Data Aerospike. Once we release a new version we will comment on this ticket to keep you updated.
The plans to support proxy client in Spring Data Aerospike were cancelled so far. If the support will be added at some point, it will be reflected in Spring Data Aerospike release notes.