Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help: Setting up Aerospike Cloud #220

Open
ind3x opened this issue Dec 22, 2023 · 1 comment
Open

Help: Setting up Aerospike Cloud #220

ind3x opened this issue Dec 22, 2023 · 1 comment

Comments

@ind3x
Copy link

ind3x commented Dec 22, 2023

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.

@roimenashe
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants