Xmpp gate tcp server

Hello. Advise a java solution or library that could implement a client gateway (there is a tcp server, packets go through it, you need to get messages from it to xmpp. I thought to use smack, but the problem is multithreading - it is unlikely to withstand 5000 clients.