简体   繁体   中英

How to handle growing number of STOMP topics with Spring-boot

I am currently developing a Spring-boot app that uses STOMP over Web sockets to communicate with the frontend. In my solution, I plan, the clients to periodically subscribe to new dynamically generated topics (such as: /app/topic/some/object/{id} ), these topics are used for some time and then forgotten, and others come.

I was unable to find information on how Spring handles the created topics, and more specifically:

  • Is there a maximum number or topics that can be created?
  • What happens with dynamically created topics, that have no more subscribers and will never have anymore? Should I manually remove then, or Spring will take care of this?

I am using the simple in-memory message broker that comes with Spring-boot websockets, not a full-featured message broker like RabbitMQ or ActiveMQ.

Thanks

@Vasil Lazarov, Answer to second part of your question: STOMP topics with no more subscribers - these topics has to be handled manually. Spring does not provide auto-configuration to address this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM