How save the SMSC session object in oracle database to reuse the same session object across java spring boot pods
Note: We have 22 spring boot pods but SMPP server side agrees only to open 5 session for a account because each session is capable of handling 1000+ request per second. Since oracle is shared DB pods across 22 pods we decided to drive via oracle db.
You can't essentially, share the same connection between 2 containers.
But what you could do is to create another service SMPPService
that is going to be deployed in 5 pods, one service per each connection.
This service can expose a HTTP endpoint or, even better, read from a Kafka topic.
This service will manage your SMPP sessions. Now you can have as many applications as you would like connecting to this service and never be woried about exeeding the number of connections.
The downside is that you need to develop, deploy and manage another service. But if you don't think that you need to modify this service too much in the future, it's worth it.