Because of its ecosystem diversity, tropical rainforests have multiple food chains that form a giant food web. A typical food chain could be:
Fruit (autotroph) - Mosquitoes (insect, primary consumer) - Mice (insectivore, secondary consumer) - Coatimundi (rodentivore, tertiary consumer) - Jaguar (predator, quaternary consumer) - Andean Condor (detrivore).
A food chain doesn't have any role, since it is just a human idea, a way of representing the flow of energy through an ecosystem. It is important that food goes through a cycle, recycling the used elements and compounds back into the environment in a form which they can be used again. In an open system that does not return these things back to a useable form and location, the environment will change, possibly quite quickly. Possibly even endangering life as we know it.
An example of an unsustainable, open system would be when rainforests are cut down and the land is used for some other purpose such as for cattle. The new system that was set up rapidly exhausts what resources were available and often in only a few years, the land becomes largely non-producing. Contrast the resulting 'desert' with the ancient rainforest that existed for many, many years producing and supporting a huge amount of biomass.