Coder Social home page Coder Social logo

Comments (4)

caleblloyd avatar caleblloyd commented on June 15, 2024

What command are the clients executing?

If they are trying to make a file-backed stream then it's expected.

from k8s.

samstride avatar samstride commented on June 15, 2024

@caleblloyd , I am using the official go client.

       connectionOptions := []nats.Option{
		// Activate retry logic if a connection cannot be established at the start.
		nats.RetryOnFailedConnect(true),
		nats.ReconnectHandler(func(_ *nats.Conn) {
			// Note that this will be invoked for the first asynchronous connect.
			logger.Info("Connection to NATS restored ...")
		}),
       
       natsConnection, natsJetStream, err := NewJetStreamConnection(
		natsURL,
		connectionOptions,
		nil, // nil jetstream options
	)
	if err != nil {
		return nil, nil, err
	}

Hmmm, something must have changed.

from k8s.

jeromedoucet avatar jeromedoucet commented on June 15, 2024

@samstride

I don't now if that may be related with your problem, but the default storage type is, according to the documentation, the file one.

btw, the go client follow that :

const (
	// FileStorage specifies on disk storage. It's the default.
	FileStorage StorageType = iota
	// MemoryStorage specifies in memory only.
	MemoryStorage
)

I don't know how you manage your streams, but I guess you should explicitly set the memory storage type for them 🤷 .

from k8s.

samstride avatar samstride commented on June 15, 2024

@jeromedoucet . Thanks. Yes, looks like client now defaults to Filestorage.

It's interesting because previously clients did not need to specify it and nats would automatically handle things. So previously we had:

  • Nats with jetstream memory enabled and filestore disabled
  • clients did not have to specify any jetstream options.

After client update, jetstream is defaulting to filestore. This means that we either:

  • enable filestore on jetstream and not update client code
  • OR keep jetstream filestore disabled and update client code to specify the necessary option

I kinda prefer the old behaviour but I am sure there were reasons to move away from that.

Thanks.

from k8s.

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.