both producers and consumers are the part of ecosystem but finally either directly or indirectly they become food of the decomposers that may be micro-organisms or the larger parasite or saprophyte ..
organisms taking food from living host are parasite while taking food from dead matter are saprophytes..