Add option to automatically set User-ID in basicPublish
メンテナーはふだん 1 日以内に返信
@UmerQureshi21 がすでに取り組んでいます。
2026年1月19日 から。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- java, rabbitmq
調査の方向性
Issue で参照されている ConnectionFactory、Connection、channel.basicPublish、AMQP.BasicProperties から調査を始めてください。設定されたユーザー名をどこに保持できるか、また現在の publish 処理が User ID をどのように扱っているかを確認してください。明示的な接続オプションまたはアクセス可能なユーザー名によって、アプリケーション層を介して渡すことなく publishing User-ID を設定でき、その関連する動作がテストでカバーされていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem? Please describe.
I am in the process of enabling Validated User-IDs to authorize RPCs.
Here is the example code from the documentation:
AMQP.BasicProperties properties = new AMQP.BasicProperties();
properties.setUserId("guest");
channel.basicPublish("amq.fanout", "", properties, "test".getBytes());
But right now getting the correct user id is kind of complicated. To gain access to the the username I would have to pass it down multiple layers of abstractions and dependency injection, as it is currently only available when creating the connection, not when using it.
Describe the solution you'd like
I would like to enable an option while creating the connection to always use my username as the user ID when publishing a message. Something like this:
connectionFactory.setUsername("bob")
.setPassword("mypassword")
.automaticallySetUserIdToUsername(true);
Alternatively this could be solved by making the username a public attribute of the Connection, so I could solve it like this:
AMQP.BasicProperties properties = new AMQP.BasicProperties();
properties.setUserId(channel.getConnection().getUsername());
channel.basicPublish("amq.fanout", "", properties, "test".getBytes());
This would require me to update a handful of code segments, but would be doable.
Describe alternatives you've considered
No response
Additional context
No response
- 主要言語
- Java
- スター
- 1.3k
- フォーク
- 588
- 平均マージ
- 4時間 40分
- マージ済み PR(30日)
- 38
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rabbitmq/rabbitmq-java-client のほかの issue
-
Bump dependenciesオープンdependency-upgrade
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
rabbitmq/rabbitmq-java-client#2110 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
rabbitmq/rabbitmq-java-client#1535 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
rabbitmq/rabbitmq-java-client#1421 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Thread Pinning occurs with VirtualThreads enabled (spring boot 3)再び着手できるかも @acogoluegnes が 952 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンenhancement help-wanted
rabbitmq/rabbitmq-java-client#1276 · コメント 3 件 · 担当者 2 名 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
rabbitmq/rabbitmq-java-client#1194 · コメント 6 件 ·
メンテナーはふだん 1 日以内に返信
rabbitmq/rabbitmq-java-client の issue をすべて見る
似ている issue
-
status: waiting-for-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
spring-projects/spring-framework#37614 ·
メンテナーはふだん 1 日以内に返信
-
azure-spring azure-spring-aad Client
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Azure/azure-sdk-for-java#51046 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
helm-knative-apply.sh fails with Helm 4対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンarea: triage theme: undefined
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
jhipster/generator-jhipster#35895 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
oracle/graalvm-reachability-metadata#11659 ·
メンテナーはふだん 1 日以内に返信