Feat: Send userAgent with client identity#62
Draft
pniedzielski wants to merge 7 commits intobloomberg:mainfrom
Draft
Feat: Send userAgent with client identity#62pniedzielski wants to merge 7 commits intobloomberg:mainfrom
userAgent with client identity#62pniedzielski wants to merge 7 commits intobloomberg:mainfrom
Conversation
c697852 to
3e77a2f
Compare
678098
previously approved these changes
Jan 16, 2026
This patch teaches session negotiation to send a user agent of the form "com.bloomberg.bmq(javaXX.YY.ZZ):AA.BB.CC", where "XX.YY.ZZ" is the version of Java this SDK is running on, and "AA.BB.CC" is the SDK version. It additionally sets the user agent to in the `PlainConsumerIT` and `PlainProducerIT` integration test clients to different strings. These clients are not simple users of this SDK, and construct the sockets they communicate on directly. It is thus useful to distinguish them on the broker from normal users of the SDK. Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
This patch exposes an option in `SessionOptions` that a user can set, which will be prefixed to the beginning of the user agent sent to the broker during session negotiation. This prefix does not need to be set, but if it is, it must consist only of printable ASCII characters and must be less than 128 characters long. Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
3e77a2f to
5d29aa2
Compare
This patch fixes several warnings on JDK 21 and later, in which a subclass can override a method called from its superclass’s constructor, letting it see a partially formed `this` object. Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
This patch fixes a warning on newer JDKs, where we narrow a `long`
down to an `int` during a compound assignment later on in the
function. This `long` is the result of the `readByte()` call on the
line changed by this patch, and we might as well store it as an `int`
early on.
[WARNING] /Users/pniedzielski/Projects/bloomberg/blazingmq-sdk-java/bmq-sdk/src/main/java/com/bloomberg/bmq/impl/infr/proto/MessagePropertiesImpl.java:[234,24] implicit cast from long to int in compound assignment is possibly lossy
Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
This patch fixes an implicit conversion from `int` to `byte` that
newer JDKs warn about.
[WARNING] blazingmq-sdk-java/bmq-sdk/src/main/java/com/bloomberg/bmq/impl/infr/proto/EventHeader.java:[255,31] implicit cast from int to byte in compound assignment is possibly lossy
This is ultimately because bitshifts in Java only operate on integral
types, not bytes, so `typeAsByte` is promoted to a `byte` before being
or’d with `typeSpecificUpdate`.
Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
5d29aa2 to
a69bdb9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bloomberg/blazingmq#1036