Guard the unread-lookup itself, not just the broadcast

FixMediaService
Ya
26 Agosti 2026, 01:01 UTC
Mwandishi
Kamo
Ahadi ya
36434f4

Review finding on Task 9: persistInbound is @Transactional, and only the broadcast() call inside the per-member loop was exception-safe (it swallows its own failures) — the findBySession lookup feeding it was not. A transient repository/connection failure there would have propagated out of persistInbound and, under Spring's default rollback rule, rolled back the inbound message the same call had just saved. Wrapped the whole loop in the same try/catch pattern publishSocialVisitor already uses in this class, and corrected the comment that overclaimed broadcast() alone was enough. Adds a regression test that stubs findBySession to throw and asserts persistInbound does not propagate it — the pre-fix code had no such guard, so this pins the specific failure mode the review flagged.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei