Consumers depend on producers for their sustenance. They are classified as primary, secondary, and tertiary consumers.
Primary consumers depend directly on the producers for food. They are exclusively herbivores.
Secondary consumers are carnivores that consume herbivores, while, tertiary consumers are the topmost carnivores that consume both primary and secondary consumers. They may also be omnivores like bears.
Decomposers are those that consume the energy of all of the above consumers and even producers. When a producer or a consumer dies, its body is decayed and consumed by decomposers like bacteria and fungi.