Azure / Azure/azure-functions-python-worker

[BUG] Azure Functions (Python V2 model) doesn't seem to support Session-based Service Bus Queue triggering

オープン
#1,211 コメント 3 件 リアクション 0 件 担当者 1 名 @bhagyshricompany が担当を希望しています GitHub で見る
area:python-functions needs-investigation sdk-bindings
主要言語
Python
スター
357
フォーク
116
平均マージ
32分
マージ済み PR(30日)
1

説明

### Investigative information
###### Please provide the following:

- Timestamp: 2023-04-05 10:04
- Function App name: hoiaipocnonprdeuwfacdc
- Function name(s) (as appropriate): cdc
- Core Tools version: 4.0.5095

### Repro steps
###### Provide the steps required to reproduce the problem:

- **Package Name**: azure-functions
- **Package Version**: 1.13.3
- **Operating System**: WSL Ubuntu (in VSCode) and Windows 11
- **Python Version**: 3.10.4

I'm trying to create a Azure Service Bus Queue - triggered function using the Python v2 programming model, but I'm running into a bug.

I'm mainly following the steps outlined in this article: https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-service-bus-trigger?tabs=python-v2%2Cin-process%2Cextensionv5&pivots=programming-language-python

The only difference being that the Queue I have created is Session-aware.

I'm trying to figure out how to specify the Session-id, but can't seem to find it back in the documentation, nor anywhere online.
![image](https://user-images.githubusercontent.com/22496343/230016364-96848187-6307-4409-8517-852feb5fb474.png)

**Expected behavior**

**Screenshots**
Full screenshot from the logstream:
![image](https://user-images.githubusercontent.com/22496343/230017194-6f302fcf-fa7c-45b8-ada6-e722165d8774.png)

### Expected behavior
###### Provide a description of the expected behavior.

That I'm either able provide the Session-id as a decorator parameter, or that the functioning of the Queue-trigger for session-aware queues is agnostic, and can take in messages normally.

### Actual behavior
###### Provide a description of the actual behavior observed.

The error message is as follows:
```
[Error] ReceiveBatchAsync Exception: System.InvalidOperationException: It is not possible for an entity that requires sessions to create a non-sessionful message receiver.
```

It works fine for a non-Session-aware Queue trigger, but it starts throwing the error if I make it Session-aware. I also can't seem to find any parameter for the decorator that would allow me to specify the Session-id.

### Contents of the requirements.txt file:
###### Provide the requirements.txt file to help us find out module related issues.

```
azure-functions
azure-identity
azure-servicebus
```

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

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

評価

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

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

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