Yellow fever and Japanese encephalitis are both mosquito-borne diseases, which means they are transmitted to humans by mosquitoes who carry contaminated blood from infected animals or humans. Interestingly, both of these viruses, yellow fever and Japanese encephalitis, rely on animals to keep cycling. This is what makes it hard to eradicate the two deadly diseases--you can't vaccinate all of the animals, including wild animals!
In fact, yellow fever and Japanese encephalitis have much in common:
Both yellow fever and Japanese encephalitis are spread by mosquitoes
Both yellow fever and Japanese encephalitis can infect animals as well, and depend on animals to continue their life and reproductive cycles
Both Japanese encephalitis and yellow fever are flaviviruses (as are West Nile virus, Zika, Dengue, and several other viruses)
The role of non-human primates in the yellow fever life cycle
Yellow fever has two general cycles: (1) the sylvatic cycle and (2) the urban cycle. In the sylvatic cycle, the disease infects mainly non-human primates in the canopy of the jungle. Humans are infected incidentally because they live in an area with a large number of infected primates. In the urban cycle, infection is spread by mosquitoes from human to human. There is also an intermediate "savannah" cycle that is something in between. Yellow fever vaccination efforts in Brazil have been so effective that urban transmission has not occurred for decades. All of the transmission is occurring in or near the jungle because the wild monkeys that carry yellow fever virus can't be vaccinated. This is why yellow fever virus may never be eradicated. The virus continues to have a reservoir in non-human primates in both Africa and South America, making it impossible to eradicate through vaccination efforts, or by directly going after the mosquitoes.
The role of pigs and water fowl in the Japanese encephalitis cycle
Japanese encephalitis is even more reliant on animals for its spread than the yellow fever virus is. In fact, humans don't carry enough of the virus to pass it on to other humans through mosquitoes. Pigs and water fowl accumulate the virus in much higher numbers, allowing mosquitoes to spread it to horses and humans, neither of which will ultimately carry enough to infect others. Again, all of the pigs and especially the water fowl can't be vaccinated, which means Japanese encephalitis, like yellow fever, can't be easily eradicated. And these are areas with flooded rice paddies where birds and mosquitoes love to live. To make the point of how widespread it can be, in 2022 Japanese encephalitis showed up in pigs in the southwest of the country. Epidemiologists are closely monitoring the situation there to see if the virus multiplies and infects humans in large numbers.
Vaccination efforts have been successful regardless
Despite the role of wild animals in keeping yellow fever and Japanese encephalitis alive, vaccines have had a huge, positive impact. Yellow fever confers immunity for life which has completely stopped urban transmission in Brazil. Now, the virus only spreads in and near the jungle via monkeys. In the case of Japanese encephalitis, the disease is nearly absent now from areas where it used to be endemic: Japan, Korea and Taiwan.
Get vaccinated before you go
Both yellow fever virus and Japanese encephalitis are terrible disease that you don't want to get. If you are traveling abroad in the near future, talk to a travel health specialist about whether you need to get vaccinated.