A rabbi, unlike a priest, has no binding religious law compelling him to confidentiality. I keep seeing people again and again confiding in rabbis, asking for confidentiality, only to have to it blow up in their faces when the rabbis share what they’ve been told with everyone they see fit. Some rabbis may well honor your request for confidentiality, but that is not the norm and there is no demand in Torah for them to do so.
In my experience, rabbis are as trust-worthy as car mechanics, neither more nor less.
As one rabbi wrote: “The first important principle is that unlike the medical and legal profession, the clergy, especially as noted by halakha, has, no special oath or rule proscribing the revealing of private, personal matters to others. In other words, there is no specific rabbi rule against violating confidentiality.”