Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Service Bus OutputBinding doesn't support ServiceBusMessage type with Metadata

オープン
#570 コメント 2 件 リアクション 6 件 担当者 1 名 GitHub で見る

@shreyas-gopalakrishna がすでに取り組んでいます。

2023年2月24日 から。

評価

この issue はまだ評価されていません。

説明

area:java-functions Bug needs-investigation Needs: Triage (Functions)

There doesn't appear to be equivalent functionality for setting ServiceBusMessage Metadata in the Java worker. Compare with the C# documentation: https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-service-bus-output?tabs=in-process%2Cextensionv5&pivots=programming-language-csharp#usage

Use the ServiceBusMessage type when sending messages with metadata. Parameters are defined as return type attributes. Use an ICollector or IAsyncCollector to write multiple messages. A message is created when you call the Add method.

Is there no equivalent in Java?

Repro steps

Provide the steps required to reproduce the problem:

  1. Create an Azure Function.
  2. Add azure-messaging-servicebus dependency to project.
  3. Add a @ServiceBusTopicOutput binding of type OutputBinding<ServiceBusMessage>.
  4. Create a ServiceBusMessage msg = new ServiceBusMessage("message body") object.
  5. Set some metadata via sbMessage.getApplicationProperties().put("foo","bar").
  6. call .setValue(msg) on the output binding.
  7. Run the function.
Expected behavior

A message is added to the Service Bus topic with a body of "message body" and custom metadata of "foo": "bar".

Actual behavior

The resulting message body on the topic is a ServiceBusMessage serialized as a POJO object. Custom metadata is missing.

Known workarounds

Use a ServiceBusSenderClient instead of output bindings.

Related information
主要言語
Java
スター
103
フォーク
74
平均マージ
12時間 49分
マージ済み PR(30日)
2

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Azure/azure-functions-java-worker のほかの issue

Azure/azure-functions-java-worker の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。