Repository navigation
Declare a Service Bus queue Azure accepts in the Java Terraform sample - #129
Merged
Merged
Conversation
The Terraform variant of the servicebus/java sample created a queue that is partitioned, express and duplicate-detecting, which Azure refuses ("Both DelayedPersistence and RequiresDuplicateDetection property can't be enabled together", Service Bus Resource Manager exceptions), and that requires sessions, while the Spring Boot app sends and receives without a session ID ("When you enable sessions on a queue or a subscription, client applications can no longer send or receive regular messages", Message sessions). The queue now defaults to express and sessions off, like the Azure CLI and Bicep variants of the sample.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
paolosalvatori
had a problem deploying
to
AZURE
October 13, 2026 03:11 — with
GitHub Actions
Failure
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The defaults now match Azure constraints and the application’s messaging behavior.
0 open findings
What changed in this PR
Updates the Java Service Bus Terraform sample to provision an Azure-compatible queue usable by its non-session-aware application.
Changes:
- Disables sessions by default.
- Disables express entities to remain compatible with duplicate detection.
| File | Description |
|---|---|
samples/servicebus/java/terraform/variables.tf |
Sets Azure-compatible queue defaults. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
paolosalvatori
had a problem deploying
to
AZURE
October 13, 2026 03:25 — with
GitHub Actions
Failure
paolosalvatori
had a problem deploying
to
AZURE
October 13, 2026 05:01 — with
GitHub Actions
Failure
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The Terraform variant of the
servicebus/javasample declares a Service Bus queue that Azure does not accept, and an app that could not use it if it did.MessagingGatewayBadRequest.The sample only ran because the emulator accepted any queue. With localstack-pro#9364 the Service Bus emulator validates queues and enforces sessions as Azure does, so
terraform applynow fails on this queue with Azure's error.Fixes SMF-938
Related SMF-865
Changes
samples/servicebus/java/terraform/variables.tf:servicebus_queue_express_enabledandservicebus_queue_requires_sessiondefault tofalse, like the queue of the Azure CLI and Bicep variants of the sample. Duplicate detection and partitioning stay on: Azure accepts them together.Tests
terraform/deploy.shprovisions the queue and the app printsReceived message from Azure Service Bus: Hello, World!, withLS_AZURE_ENFORCE_RBACoff and on. Before this change the same image refuses the queue withMessagingGatewayBadRequest.🤖 Generated with Claude Code