profile
viewpoint

Ask questionsmessageId property has malformed format

Hello,

The bug is in RabbitMQ part of this plugin. Messages sent with jms-messaging-plugin to RabbitMQ fedora broker have incorrect messageId property. Property messageId has prefix : year-UUID. This is bug.

From : https://fedora-messaging.readthedocs.io/en/stable/wire-format.html#message-id

The message ID field MUST be a version 4 UUID as a standard hexadecimal digit string (e.g. f81d4fae-7dec-11d0-a765-00a0c91e6bf6)

https://github.com/jenkinsci/jms-messaging-plugin/blob/master/plugin/src/main/java/com/redhat/jenkins/plugins/ci/messaging/data/RabbitMQMessage.java#L75

has code:

daee7469 (Oliver Gondža 2020-09-01 20:52:34 +0200 75)             this.msgId = Calendar.getInstance().get(1) + "-" + UUID.randomUUID().toString();

What impact is:

  • messages are malformed.
  • Broker can easily drop messages that doesn't comply with requirements.
  • There is internal logic for datagrepper, where it adds year to messageID too. ---> mess with messageID.

More info you can find at: https://pagure.io/fedora-infrastructure/issue/10084

jenkinsci/jms-messaging-plugin

Answer questions olivergondza

No idea why it is being done this way: https://github.com/jenkinsci/jms-messaging-plugin/pull/154/files#diff-55442404b12c5e36812d6d2244165fb065f02677aa22a00fc7df400e4b4011b2R98

@Zlopez, what is the motivation to prefix the auto-generated IDs? Thanks!

useful!

Related questions

No questions were found.
source:https://uonfu.com/
Github User Rank List