In one of my forts, I have a "death corridor" that I funnel goblins into during seiges. I have two bridges at the entrance to my fort: one at the start of the main entrance corridor, and one at the start of the death corridor. When a siege breaks out, I close the main entrance and open the trapped one. The latter is a long, winding 1-tile wide hall fitted with over two dozen weapon traps and about a dozen cage traps.
Once the entire goblin force has entered (I always strive for 99% obliteration), I close off the entrance so they have no choice but to move forward through all of the traps. Currently, there are enough of them to whittle down a 100-strong force to about four or five stragglers that get mopped up by my military. The ones captured are stripped of their gear, mass-pitted, and used as live combat training for my melee dwarves. If the goblins are entirely composed of melee fighters, I'll send out my soldiers earlier to get more action, but considering arrows can pierce adamantine armor so easily, I bunker down whenever archers or crossbow goblins show up. I've never been able to get my marksdwarves to do anything but clobber goblins over the head with their crossbows, so I rely solely on melee fighters.
In another fort, I have a less-lethal death corridor that softens up invading hordes but only kills a dozen or so, tops. My military is much stronger in that one, though, and my nigh-invincible legendary +5 figher/hammerdwarf militia commander can pretty much take down a whole battalion on his own. I am experimenting with a pitfall/atom-smasher combo trap, though, that I'm hoping will provide a more entertaining way of dispatching enemies.