Early Rattanakosin period in Thailand coincided wth the rule of Qing Dynasty in China. At the time, Chinese were forbidden from migrating abroad for fead that they might group together to resist the ruling Qing Dynasty of Manchu. However, the law proved no hindrance to migration, particularly from the heavily populated south of the country where inadequate cultivable land and a series of natural disasters prevailed, causing famine and other living shortages. A large number of Chinese from this area came to Thailand in junks hoping for a better living. Concerning foreign trade, foreign cargo ships were restricted to conduct trade negotiations with China only in Guangzhou(Canton). However, Thai trading junks with Chinese operating staff were able to call at different ports ranging from Hainan to Ningpo, Shanghai and Tiensin, similar to local junks. Most intensive trade was found in the north of Guangdong Province neighboring Southern Hokkien, principally in Chaozhou, Or Teochew, Prefecture. The first Anglo-Chinese Opium war lasting from 1840 to 1842 ended with the Chinese defeat, resulting in China being compelled to open up the country as well as pay an enormous amount of war damage compensation. The government, therefore, opted for revenue increase through a series of tax hikes. Widespread unrest and public ills stemming from these constituted yet another cause for the people's migration to other countries
pic below here show Britain warship attacking the Chinese fleet during the Opium War
The Signing of the Treaty of Nanking on board the British warship in 1842 in the wake of China's defeat in the Opium War