KamoCRM

Publish NATS CREATE event after transaction commit to fix image attachment race

FixMediaService
Shipped
1 மே, 2026 அன்று 2:54 PM UTC
Author
Kamo
Commit
241f0ea

The NATS message was published inside the @Transactional body, which meant recipients could receive the CREATE event and request the image via /imaging/proxy/{objImgId} before the MediaObjImg row was visible in the DB, resulting in a 404 and no image render until the chat was reopened. Now uses **************** so the NATS publish only fires once the DB transaction is durably committed.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing