Rosenberg, a liberal Democrat, is set to marry Bryon Hefner, his longtime partner, but his aides said no date has been set.
Polito’s role in the ceremony marks a further statement by her that she has cut her ties to the socially conservative wing of the Republican Party, a base she used to win elections as a state representative from her Shrewsbury-area district and for her campaign for state treasurer in 2010.
As recently as several years ago, she allied herself with antigay activist Brian Camenker and spoke glowingly of former US representative Allen West of Florida, another strong opponent of gay marriage.
When the Supreme Judicial Court legalized gay marriage in 2003, Polito consistently voted in the Legislature for constitutional bans that would have overruled the justices’ decisions.
Her public conversion — she previously supported civil unions but not gay marriage — seems to have come in 2013, when Charlie Baker, then the leading candidate for the GOP nomination for governor and a strong supporter of gay marriage, asked her to join him on his ticket. When she agreed, one of the issues that needed to be worked out was her opposition to same-sex unions.