Giter Site home page Giter Site logo

Comments (5)

semihbkgr avatar semihbkgr commented on September 26, 2024

Hi @shahamit

You can configure the capacity of ring buffer at runtime. The question isn't directly related to Helm charts.

Here is an example of your use-case.

var ringBufferConfig = new RingbufferConfig();
ringBufferConfig.setName("ringbuff")
                .setCapacity(9000);
hz.getConfig().addRingBufferConfig(ringBufferConfig);
var ringBuffer = hz.getRingbuffer("ringbuff");

You can get more information about ring buffer and its configuration.
https://docs.hazelcast.com/hazelcast/5.3/data-structures/ringbuffer#ringbuffer-configuration-examples

from charts.

shahamit avatar shahamit commented on September 26, 2024

We have two clients to hazelcast - one of them is the data producer and another the data consumer. I assume who ever executes the above code first would create the ring buffer instance with a given capacity.
This would mean we would have to configure the ring buffer capacity at both ends leaving room for human errors.

Is there a way to configure the default capacity of the ring buffer when creating the hazelcast instance so that any new ring buffers created are created with that capacity? Current its 10000.

from charts.

semihbkgr avatar semihbkgr commented on September 26, 2024

There is no way to configure default values of any configuration. You can statically configure ringbuffers with their predefined names, or you can dynamically configure ringbuffers using client at runtime.

In Hazelcast config file, you can only configure ringbuffers by their specific names. To configure via Helm charts:

# Hazelcast properties
hazelcast:
  yaml:
    hazelcast:
      ringbuffer:
        rb:
          capacity: 2000

from charts.

shahamit avatar shahamit commented on September 26, 2024

from charts.

semihbkgr avatar semihbkgr commented on September 26, 2024

You need to configure ringbuffer only once just before it is created.

If you have a guarantee that the ringbuffer is created in the producer side before the consumer tries to read data from it. Then you can configure it only in producer side and can use the ringbuffer in consumer side without configuration.

So, it is totally depends on your application design.

from charts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.