Bonds are the investment standouts of 2011, with a broad index such as Barclays’ aggregate returning nearly 7 percent and only emerging-markets bonds suffering severe losses. Bonds will be fine again in 2012. But which varieties will fare the best? What categories do you choose for the most current income? Which categories of bonds should you ignore, or sell if you own them?

The last question is the easiest to answer. The ones to avoid are intermediate-term and long-term U.S. Treasury bonds, whose role has changed from a popular source of income to a bomb shelter for governments, banks and other financial institutions.

Yes, I’m aware of Treasurys’ huge capital gains in 2011, as much as 30 percent for the longest-term bonds. But that just proves my bonds-as-bomb-shelter argument, because that rally was the result of panic buying.

I’m not the only one who thinks so. I’ve spoken with eight bond-fund managers and strategists, and all of them say the same thing. Tom Luster, director of investment-grade fixed income for Eaton Vance funds, said: “Treasurys are not as fail-safe as they used to be.” Luster says he’d rather take credit risk than interest-rate risk these days. That means he would rather take a chance that a corporation gets downgraded or defaults than hold Treasurys that lose 10 percent of their principal value as interest rates rise.

Which bonds, then? Just about every other familiar variety. Municipals head my list of income opportunities for 2012. As I write this, many tax-free state general obligation bonds (those backed by tax revenues) yield more than a Treasury of equal maturity before you figure in the added value of the tax break.

In the past, this situation would scream that the states’ creditworthiness is in doubt. But the reality is that Treasury interest rates are so out of whack that you need not worry. States, especially, are improving financially now that it looks like we’re not heading into another recession.

Your choice: Lend your money to the Treasury for 10 years at 2 percent and pay income taxes on the interest, or lend it to a triple-A-rated state such as North Carolina or Virginia for 2.5 percent tax-free. You can also fish for other kinds of tax-free bonds, such as for school construction, and collect 3 to 4 percent in interest. If you’re in the 28 percent federal bracket, 4 percent tax-free is the equivalent of 5.5 percent taxable interest. The payoff is even more if you have high state and local income taxes.

Kosnett is a senior editor at Kiplinger’s Personal Finance.