'Java EE – chat app based on REST and JMS - handling channels

I was given the task to write a chat application based on REST and JMS in Java EE.

There will be different channels in the chat. I wonder how to listen to messages only from a specific channel on the client-side.

Channels can be created by users while the application is running.

I was thinking about each channel being a separate Topic and I don't know if this is a good approach?

Is it possible to create Topics dynamically?

If there was only one main channel that all users are listening to, it would not be a problem, because each user would listen to the same Topic

Maybe there is a better solution than Topics?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source