Ray Johnstone (46) and Philip Flaherty (42), who both work in casinos in Dublin, had been drinking in Flannery's Pub on Camden Street when there was a small row after one of them bumped into a customer.
A few minutes later a group of men, including off-duty gardai Richard Cloonan and Patrick Hanley, gathered near Johnstone.
Johnstone later said he felt threatened and "became the aggressor to defend myself". He smashed the beer bottle out of which he had been drinking over Gda Hanley's head.
Flaherty then hit Gda Cloonan over the head, smashing the bottle.
Gda Cloonan was left with a cut to his hand which required six stitches.
Gda Hanley had a bump and cuts to his face.
Johnstone with an address at Camden Deluxe Hotel, Camden Street, pleaded guilty at Dublin Circuit Criminal Court to assaulting Gda Hanley, causing him harm, while Flaherty also of Camden Deluxe Hotel, pleaded guilty to assaulting Gda Cloonan, causing him harm, on November 1, 2011.
Judge Martin Nolan said the men had "for some irrational reason felt they were under threat, but I am satisfied their feelings were not based in reality".
He accepted both men had co-operated with the garda investigation, pleaded guilty at an early stage and had shown genuine remorse for their actions on the night.
Judge Nolan sentenced Johnstone to three years, which he suspended in full on condition that he hand over €3,000 to Gda Hanley immediately and an additional €1,500 in the next 12 months.
Flaherty received a four-year suspended sentence on condition that he hand over €2,500 to Gda Cloonan and a further €4,500 within a year.
Garda Emmet Hayde told Vincent Heneghan, prosecuting, that Gda Cloonan said he was dragged backwards after he was hit on the back of the head, which led to scratches and cuts to his neck.
Gda Hanley said he stumbled backwards when the bottle was smashed in his face, but regained his balance and grabbed his attacker.
Johnstone was arrested at the scene after he was restrained by the victim and his friends, while Flaherty was arrested a few days later after gardai had viewed CCTV footage of the assault.
Gda Hayde agreed with Sean Guerin, defending Johnstone, that the doormen in Flannery's knew his client and were surprised by his behaviour.
Mr Guerin asked Judge Nolan to accept that his client did not go looking for a weapon and just used what came to hand.
Luigi Rea, defending Flaherty, said his client was so embarrassed that he has not returned to Flannery's since.