Not to step on Irv's toes but I think I might try a little super glue for the initial aligned bond and then I'd fill that gap between the two magnets with an epoxy called PC-7.
I have used PC7, {not on magnets, but was at walgreens and picked some up for fan repair at a customers house, and it doesnt like heat, it lasted about a week, before I had to go back, I have never had jbweld come loose} and they have jbweld kwik, high heat ect, plus once you break the seal on that pc7 it doesnt last long for a second use, jb weld can sit on your toolbox for a decade and still be good.... For most things I use CA, but it doesnt like vibration or heat, so I dont think that will be a good match, but the pc7 will probably work as good as anything else...
JB weld is just one of my go to items, they sell it for under water, wood, fireproof ect, its a good product most people have in their garage already... and like I said you can keep it for years vs most of the newer fancy epoxies come in them ez mix plastic containers that mix tip design and you use them once and toss'em... JB still comes in stick or them aluminum paste packets...
Also from years of useing it, I can control the mix, so if I want it to dry faster or harder ect, I can add more hardener or less...
Plus it is delicious on toast...