Ten thousand dogs are expected to die in the southwestern Chinese city of Yulin during this weekend's dog-meat "festival," an annual event since 2009 that has been denounced in many parts of the world.

Cooks will prepare the dogs' flesh and serve it to visitors with a lychee wine. Dog meat also appears on restaurant menus throughout China.

However, establishments that specialize in canine fare have been shutting down during the last several years as protests against such dining practices have risen, especially among China’s new middle class.

A prominent Chinese rights activist and blogger, Hu Jia, said that as the Chinese economy has developed, there has been a surge in the number of people who have dogs or other pets that are looked upon as family members. Of China's 130 million dogs, nearly 30 million are kept as household pets.

Hu said concern about animal rights has grown as well, with some people turning to active protests to protect animals. Hu likened animal-rights activists who have surrounded trucks carrying stray dogs to slaughter to environmental protesters who chained themselves to trees to preserve forests.

Jill Robinson, founder of the Animals Asia Foundation, said that "when I first started investigating the dog- and cat-meat trade in the 1980s, there was one animal welfare group, and now there are more than 150 animal welfare groups. These are people who are not just rescuing dogs and cats, but they are really using a high level of intelligence to understand all the different components of the industry, too.”

William Nee of Amnesty International said that while animal-rights activists have grown in number in China, they still face persecution by the Chinese government.

“We do see the local people confront the people who are [killing and eating dogs], and [they] mobilize small-scale local campaigns," he said. "And I think it shows that China is changing, and people are more willing to ... take risks and protest. But, of course, there are limits to this, because the Chinese government is very intent on clamping down on what they see as mass incidents or unrest.”

Activist Hu said persuading those who eat dogs to switch to other foods is much like efforts to control smoking in public. It may be difficult to get people to change persistent habits, but social pressures are increasing.

And there have been signs of progress. Guangzhou just closed a dog-meat restaurant that had been in operation for 51 years. Virtually no dog-meat restaurants operate in Beijing, after a crackdown ahead of the 2008 Olympics. Four years ago, authorities in the city of Jinghua shut down another dog-meat festival.

The event in Yulin, a city of 7 million, originally was a celebration of the summer solstice, which takes place this year on Sunday. So far, animal-rights activists have failed to stop it.

But Hu said he thought that with the custom of eating dog meat becoming increasingly marginalized, events such as the one in Yulin would fade away.