I’m using event bus events to detect publish and take offline (depublish) events. There is no update event when the article is already published and an update is being published without taking the article offline. Do you know if there is a possibility to differentiate the first publish from an update?
There is only a publish event. In order to know if this is an update you would need to check if the published variant is live. The event comes after publish so you have no oppurtunity to check that. Not sure what you are trying to achieve, but you could likely hook into the publish action itself to do something. See SCXML Workflow Engine - Bloomreach Experience Manager (PaaS/Self-Hosted) - The Fast and Flexible Headless CMS
For the news articles, we do a lot of different things, like cache busting, database updates, tracking etc. We currently use the event bus publish and depublish events to update our internal database, where we cache things like some of the article properties, as well as comments (handled by a 3rd party service) for use by our internal APIs. Having a distinction between first publish and update is important for observability.
Well, technically the published variant only exists when you publish, but if you get a publish event then you already have a published variant. I would use an event listener on the publish event. In the latter case you should have your own publish property. If its empty then you set it with the publish date. If it’s set then you know it’s an update.