When Tops Friendly Markets declared bankruptcy last month, shoppers in small towns and rural areas were in a tizzy. For decades now, residents in New York, Pennsylvania and Vermont have depended on Tops for their groceries. In some of these towns, Tops is the lone option for grocery shopping.

Without these stores, some shoppers would have to drive 45 minutes to an hour to reach their nearest Walmart. Tops has, however, announced that even after filing for bankruptcy it plans to keep open its 169 locations.

Small and medium-sized grocery businesses in the U.S. are on shaky grounds, with big names like Walmart and Costco leading the price wars. With Amazon entering into the sector, the death knell is ringing for many.

But the way people shop in urban and rural areas is different, and herein lies the problem.

Urban grocery shopping entails looking for discounts and best bargains along with a comprehensive selection of items. Today's grocery shoppers also look for in-house experiences like a bar, bakery and even eateries inside. For the rural shopper, however, fancy can take a rest as long as they don't have to drive for miles when they run out of milk. All over America, small towns are fighting to save their grocery stores.

Amazon may be ruling the grocery segment soon, but how will they cater to customers in remote locations? While many rural consumers are not as net-savvy as their urban counterparts, they are quickly catching up. But logistics is still an issue. In the meantime, they are dependent on their local grocery chains or the mom-and-pop stores that have managed to survive.

In a strange turn of events, Dollar General has become their unlikely hero. The store, known for selling myriad items at the lowest price, is now doing brisk food and grocery business.

According to a recent report, Dollar General is rapidly expanding — opening as many as three stores a day. This is an interesting development when overall grocery openings decreased by 28.8 percent in 2017.

For remote towns with no grocery stores nearby, Dollar General is not just their lifesaver, but also a retail and social hub. Residents jokingly refer to it as their only mall. Funny as that may sound, the state of the grocery business in rural areas is a concern.

Elsewhere, family-owned grocers and mom-and-pop stores are closing, if they haven't already. It's difficult to keep up with the changes and the price wars, especially with limited shoppers and resources as younger generations have moved out of small towns in search of better opportunities.

A lot of these businesses are run by elderly couples. They want to sell their business and enjoy the rest of their golden years. In such cases, town councils have stepped in to help as these stores often act as the linchpin of these small communities.

But is this a sustainable solution? That remains to be seen.