Coder Social home page Coder Social logo

Comments (3)

tamirMoshiashvili avatar tamirMoshiashvili commented on July 20, 2024 1

Thank you for your answer

from spring-redis-websocket.

RawSanj avatar RawSanj commented on July 20, 2024

In the class AsyncConfig, you used thread-pool of size 2, is it possible to use more?

Yes. You can assign more threads. The limit depends on the CPU/Memory and No. of concurrent requests you expect to handle. More Info at Spring Task Docs.

Why is Topic in ApplicationProperies and when does it get initialized? I assume that the method getChatMessage supposed to return "/topic/chat".

Topic is initiated by Spring Boot on boot-up when key-values are mapped from application.properties file. Its used for nested config. More Info at Spring Externaliz Config - Nested Properties.
I could have avoided the topic class by moving topic to prefix (i.e. raw.topic) since there is no other property in the root level.

So this Class can be re-written as:

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = "raw.topic", ignoreUnknownFields = false)
public class ApplicationProperties {

    private String message;
    private String count;

    public String getCount() {
        return count;
    }

    public void setCount(String count) {
        this.count = count;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}

Note: I have removed Topic class and moved its properties to outer class and updated prefix from raw to raw.topic.

from spring-redis-websocket.

RawSanj avatar RawSanj commented on July 20, 2024

I hope the above answers your questions. So I'm closing this.

from spring-redis-websocket.

Related Issues (3)

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.