Open Bug 1625386 Opened 5 years ago Updated 5 years ago

Consider publishing pulse message that do not have the top-level metadata.

Categories

(Developer Services :: Mercurial: hg.mozilla.org, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

People

(Reporter: tomprince, Unassigned)

References

Details

In the early history of pulse, mozillapulse was used to generate message, and that library duplicated message metadata as part of the message.

Thus, the format was something like

{
    "payload": <message goes here>,
    "_meta": {
        <routing-key, exchange timestamp>
    }
}

I'm not sure that mozillapulse is being used anymore, and the other primary producer of pulse message (i.e. taskcluster) does not generate the nested message.

I noticed that :dustin was surprised by this in Bug 1527434, and I ended up being surprised by it.

I think it would make sense to publish message on a v3 exchange without the extra layer of wrapping.

I also noticed that the pulse messages use time whereas json-pushes uses date. If we are creating a v3 exchange, it might make sense to make the pulse message match json-pushes.

hgmo itself doesn't use mozillapulse - we just create the message according to that schema.

So essentially the work needed here is to create a new exchange/hgpushes/v3 exchange, decide on the new format, and modify hgmo to send messages to this new exchange in this format. Consumers should then switch over as desired and we should recommend new consumers use the v3 exchange. Anything I'm missing?

(In reply to Connor Sheehan [:sheehan] from comment #2)

hgmo itself doesn't use mozillapulse - we just create the message according to that schema.

Yep. I included the details as historical context for why the messages were originally that way.

So essentially the work needed here is to create a new exchange/hgpushes/v3 exchange, decide on the new format, and modify hgmo to send messages to this new exchange in this format. Consumers should then switch over as desired and we should recommend new consumers use the v3 exchange. Anything I'm missing?

That sounds correct.


I just noticed the exchange has pushes in the name but has more than pushes. I wonder if it would make sense to either:

  • remove pushes from the exchange
  • have multiple exchanges.
You need to log in before you can comment on or make changes to this bug.