Azure / Azure/azure-functions-java-library

Unable to access PartitionContext or get PartitionId when using EventHubTrigger

オープン
#138 コメント 3 件 リアクション 3 件 担当者 0 名 GitHub で見る
area:java-functions
主要言語
Java
スター
45
フォーク
49
PR マージ指標
30日以内にマージされた PR はありません

説明

While using EventHubTrigger, unable to access PartitionContext. Also I am not finding any other way to access the partition Id.
Please find below the code. On trying to get PartitionContext using @BindingName, partitionContext object is null.

```
@FunctionName("EhbExample")
@StorageAccount("AzureWebJobsStorage")
public void run(
@EventHubTrigger(name = "msg", cardinality = Cardinality.MANY, eventHubName = "%SourceEHName%", connection = "SourceEHConnString", consumerGroup = "%SourceEHConsumerGrp%") List eventData,
final ExecutionContext context, @BindingName("SystemPropertiesArray") SystemProperty[] systemProperties,
@BindingName("PartitionContext") PartitionContext partitionContext ) {
Logger log = context.getLogger();
log.info("Triggered Function App");

log.info("Partition Id: " + partitionContext.getPartitionId());

for (int i=0;i

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず、Java ライブラリでの EventHubTrigger binding と、PartitionContext および SystemPropertiesArray に対する @BindingName の処理を追跡します。提供された EhbExample コードを使って PartitionContext が null になる動作を再現し、パーティション ID にアクセスするためにサポートされている方法を特定します。報告された binding に対するカバレッジを含め、動作が修正されるか明確に文書化されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
azure, java
領域
backend, cloud
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
20/100

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

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