[Service Bus] SDK binding rejects messages without x-opt-lock-token annotation despite host-provided lock-token prefix
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 76/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- azure, node.js, typescript
Direzione di ricerca
Leggi azure-functions-nodejs-extensions-servicebus/src/util/serviceBusMessageDecoder.ts, in particolare i controlli del decoder sul token di blocco e l’analisi del prefisso. Confronta il suo comportamento con il contenuto di binding segnalato: un prefisso GUID di 16 byte seguito da byte AMQP grezzi. Aggiungi test di regressione per i messaggi senza annotazioni e per un ordinamento dei byte GUID diverso da zero, quindi conferma che la conversione restituisce il token dal prefisso.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
@azure/functions-extensions-servicebus version 0.5.1 fails to convert incoming messages when their AMQP representation lacks x-opt-lock-token, even when binding content includes the 16-byte lock-token prefix supplied by the Functions host.
The affected topic receives REST-published messages. Every observed invocation fails before entering the handler. We have not captured the failing host payload, so the relationship to REST publishing remains an observation rather than a confirmed cause.
Environment
@azure/functions-extensions-servicebus:0.5.1@azure/functions:4.17.0- Azure Functions on Windows
- Host version shown in worker path:
4.1055.300 - Extension bundle:
Microsoft.Azure.Functions.ExtensionBundle, range[4.0.0, 5.0.0) - Trigger:
sdkBinding: true,cardinality: 'one' autoCompleteMessages: falsein host configuration and trigger registration
Actual Behavior
Invocation fails during argument conversion, before the handler runs:
Unable to create client. Please register the extensions library with your function app.
Error: Lock token not found in content
at fromRpcTypedData.ts:40:19
at InvocationModel.ts:85:29
at InvocationModel.getArguments
Disabling autocompletion and using manual settlement did not resolve the error.
Reproduction
Construct binding content with a 16-byte GUID prefix followed by an AMQP message without x-opt-lock-token. The extension factory throws Lock token not found in content.
Adding message_annotations: { 'x-opt-lock-token': Buffer.alloc(16) } makes conversion succeed, with the returned token correctly read from the prefix.
We reproduced identical results using the native CommonJS SDK entry point and a minified esbuild bundle.
Expected Behavior and Suspected Cause
The host's ConvertReceivedMessageToBindingData serializes 16 GUID bytes followed by raw AMQP bytes.
However, ServiceBusMessageDecoder.decode first searches for x-opt-lock-token and throws if absent, although it subsequently reads the token from the prefix.
Could the decoder validate and read the prefix directly without requiring the annotation? Regression coverage should include annotation-free messages and nonzero GUID byte ordering.
Impact
All observed invocations of the affected function fail before business processing or settlement can run.
- Lingua principale
- TypeScript
- Stelle
- 2
- Fork
- 8
- Merge medio
- 4g 23h
- PR unite (30g)
- 12
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Azure/azure-functions-nodejs-extensions
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Azure/azure-functions-nodejs-extensions#167 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 64/100
Azure/azure-functions-nodejs-extensions#105 ·
I maintainer di solito rispondono entro 1 giorno
-
[Feature] Add @azure/functions-extensions-kafka package for KafkaRecord bindingForse già presa @TsuyoshiUshio l’ha presa 201 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 70/100
Azure/azure-functions-nodejs-extensions#103 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
Azure/azure-functions-nodejs-extensions#61 · 6 commenti · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Azure/azure-functions-nodejs-extensions
Issue simili
-
bug from-app needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
nightly-labs/openbot#7447 ·
I maintainer di solito rispondono entro 1 giorno
-
Team:ResponseOps technical debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
elastic/kibana#304569 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
security
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
IBM/ibmi-mcp-server#256 ·
I maintainer di solito rispondono entro 7 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
egonSchiele/agency-lang#1444 ·
I maintainer di solito rispondono entro 1 giorno
-
[fullsend] E2E: backstage-gitlab-events-org — socket hang up during catalog poll needs retriesApertae2e-failure ready-to-code
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
redhat-developer/rhdh-plugin-export-overlays#4746 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno