Hi Martin, It is not really necessary as you pointed out, but an external registry forces me to override the default IWebSocketConnectionRegistry so I can update the external registry when connections are added and removed.
If connections themselves would support metadata, there would be no need for an external registry plus the required glue code for keeping the registry up to date. But if you prefer not to add functionality I can go ahead and implement an external solution and see how it goes. Best regards, Thomas On Wed, Mar 25, 2020 at 7:19 PM Martin Grigorov <mgrigo...@apache.org> wrote: > Hi Thomas, > > Is this really necessary? > You can achieve the same today by using an external registry. > E.g. List<Channel> channels = channelRegistry.get(webSocketConnection); > internally the registry can use WebSocketConnection's > getApplication().getName(), getSessionId() and getKey() to construct the > key. > > MetaData would do the job as well, but I'd prefer to not add more > functionality unless really needed. > > Regards, > Martin > > On Wed, Mar 25, 2020 at 6:30 PM Thomas Heigl <tho...@umschalt.com> wrote: > > > Hi all, > > > > I'd like to add metadata to websocket connections. For instance, which > > events or channels a connection is subscribed to. > > > > What do you think about adding MetaDataEntry<?>[] metaData to connections > > and setMetaData/getMetaData to IWebSocketConnection? > > > > Best regards, > > > > Thomas > > >