Adding wait for message and expanding wait for index

* Making review changes
Change-Id: I96006659356be9d60f0c4d442a060ec20906883c
Merge "Adding wait for message and expanding wait for index"