Should every action have a consequence?
My table is currently operating under the assumption that the players are all "white hats", basically decent people. Resorting to violence when it isn't called for on a regular basis would violate the table agreement, and be cause for an out of game discussion.
Similarly, on the basis of that table agreement, yes, there are consequences for doing bad things.
What if it's just shenanigans
Use of deadly force is not classified as "just shenanigans" at my table. If the PCs start a barroom brawl, and no weapons got drawn, and nobody was serious injured in a way a long rest wouldn't fix, then it can be shenanigans. But you don't kill the shopkeeper and his wife, leaving their kids orphans, and get to claim it was "just shenanigans".
and a strong response from the DM would derail the campaign
If everyone agreed to the table premises, the campaign is derailed when the PC violates those premises.
, would you say that consequences are consequences, and just rewrite your campaign, which now becomes e.g. a jailbreak? Or do you look the other way do you don't have to toss out the entire plot?
As above - the PC has already thrown away the plot, so to speak, so I'm not under any onus to follow it any more.
Do you even actively seek some sort of revenge to teach those roguish players to do better roleplay?
Do I, as GM, seek revenge? No. It isn't personal like that. The game world has people in it who will seek justice and/or view the party as a threat, though.
When a bunch of orcs or bandits comes through town and murders people, the town generally finds people like the PCs to deal with them. If the PCs decide to become the bandits, the logic for how that gets dealt with is already in place.