-
Notifications
You must be signed in to change notification settings - Fork 543
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
78837be
commit 9e9f374
Showing
12 changed files
with
184 additions
and
22 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
playground/AzureServiceBus/ServiceBus.AppHost/aspire-manifest.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/aspire-8.0.json", | ||
"resources": { | ||
"sbemulator": { | ||
"type": "azure.bicep.v0", | ||
"connectionString": "{sbemulator.outputs.serviceBusEndpoint}", | ||
"path": "sbemulator.module.bicep", | ||
"params": { | ||
"principalType": "", | ||
"principalId": "" | ||
} | ||
}, | ||
"worker": { | ||
"type": "project.v0", | ||
"path": "../ServiceBusWorker/ServiceBusWorker.csproj", | ||
"env": { | ||
"OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES": "true", | ||
"OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES": "true", | ||
"OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY": "in_memory", | ||
"ConnectionStrings__sbemulator": "{sbemulator.connectionString}" | ||
} | ||
} | ||
} | ||
} |
73 changes: 73 additions & 0 deletions
73
playground/AzureServiceBus/ServiceBus.AppHost/sbemulator.module.bicep
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
@description('The location for the resource(s) to be deployed.') | ||
param location string = resourceGroup().location | ||
|
||
param sku string = 'Standard' | ||
|
||
param principalType string | ||
|
||
param principalId string | ||
|
||
resource sbemulator 'Microsoft.ServiceBus/namespaces@2024-01-01' = { | ||
name: take('sbemulator-${uniqueString(resourceGroup().id)}', 50) | ||
location: location | ||
properties: { | ||
disableLocalAuth: true | ||
} | ||
sku: { | ||
name: sku | ||
} | ||
tags: { | ||
'aspire-resource-name': 'sbemulator' | ||
} | ||
} | ||
|
||
resource sbemulator_AzureServiceBusDataOwner 'Microsoft.Authorization/roleAssignments@2022-04-01' = { | ||
name: guid(sbemulator.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '090c5cfd-751d-490a-894a-3ce6f1109419')) | ||
properties: { | ||
principalId: principalId | ||
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '090c5cfd-751d-490a-894a-3ce6f1109419') | ||
principalType: principalType | ||
} | ||
scope: sbemulator | ||
} | ||
|
||
resource queue1 'Microsoft.ServiceBus/namespaces/queues@2024-01-01' = { | ||
name: 'queue1' | ||
properties: { | ||
deadLetteringOnMessageExpiration: false | ||
} | ||
parent: sbemulator | ||
} | ||
|
||
resource topic1 'Microsoft.ServiceBus/namespaces/topics@2024-01-01' = { | ||
name: 'topic1' | ||
parent: sbemulator | ||
} | ||
|
||
resource sub1 'Microsoft.ServiceBus/namespaces/topics/subscriptions@2024-01-01' = { | ||
name: 'sub1' | ||
properties: { | ||
maxDeliveryCount: 10 | ||
} | ||
parent: topic1 | ||
} | ||
|
||
resource app_prop_filter_1 'Microsoft.ServiceBus/namespaces/topics/subscriptions/rules@2024-01-01' = { | ||
name: 'app-prop-filter-1' | ||
properties: { | ||
correlationFilter: { | ||
correlationId: 'id1' | ||
messageId: 'msgid1' | ||
to: 'xyz' | ||
replyTo: 'someQueue' | ||
label: 'subject1' | ||
sessionId: 'session1' | ||
replyToSessionId: 'sessionId' | ||
contentType: 'application/text' | ||
} | ||
filterType: 'CorrelationFilter' | ||
} | ||
parent: sub1 | ||
} | ||
|
||
output serviceBusEndpoint string = sbemulator.properties.serviceBusEndpoint |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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