Is jdbc river is going to expire? If yes then what is the alternative to connect the database

JDBC river for ES 1.5 and higher will be followed by a standalone JVM solution, a JDBC feeder, which uses transport client, with only small changes to JSON river specification syntax.

Existing river versions of JDBC river will be supported until ES versions 1.3 and 1.4 will reach end of updates.

I will publish a document how to move to the standalone JDBC feeder so transition will be smooth.

If you want to have a glimpse at the upcoming source code, look at the "noriver" branch at https://github.com/jprante/elasticsearch-jdbc/tree/noriver (the README is still work in progress)