jbonofre commented on issue #2752: URL: https://github.com/apache/activemq/issues/2752#issuecomment-6421339145
A few notes: - JMS 1.1 and 2.0 specs list `JMSXGroupID` and `JMSXGroupSeq` as optional JMSX properties, which a provider "may" support. The semantics come from the provider. - The spec doesn't say whether `""` is valid. It says nothing about grouping semantics at all: no "all messages with the same group go to one consumer" rule, and no empty-value behavior. - So we could consider as ActiveMQ behavior rather than a spec violation either way. Our docs on message groups describe what a group is, and that is the reference to follow. I don't think anyone would use `""` as group ID 😄 I think treating an empty `JMSXGroupID` as "no group" is the better behavior: - An empty value is almost always an unset value passed through from application code, and pinning everything to one consumer silently defeats load balancing. - It matches how other brokers handle it. - It also fixes the console display, because `JMSXGroupID` and `JMSXGroupSeq` would no longer be listed for those messages. I would propose: 1. Normalize `""` to null when the group ID is set on the message, rather than only guarding in the queue. That way the broker, JMX and the web console all agree. 2. Handle only the empty string. Whitespace-only IDs stay valid group names, since trimming would silently change legitimate values. 3. We should add a test with two consumers and `""` group IDs, checking that messages are distributed across both. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information, visit: https://activemq.apache.org/contact
