ITADN

Transactional outbox messages not being published in Outbox sample

#221Openstephenchristian-aveva 创建于 2024-08-08
<!-- If you need to report a security issue please visit https://docs.dapr.io/operations/support/support-security-issues --> ## In what area(s)? <!-- Remove the '> ' to select --> /area runtime > /area operator > /area placement > /area docs > /area test-and-release ## What version of Dapr? Sample is on 1.12.0, but I have also reproduced the behavior in 1.13.5 ## Expected Behavior I was interested in trying out the Transactional Outbox feature which is currently in preview along with Azure Cosmos DB and Azure Service Bus. I downloaded the [sample application for Transactional Outbox](https://github.com/dapr/samples/tree/master/outbox) and made a couple modifications to use Cosmos and Service Bus instead, which I've detailed in the "Steps to Reproduce the Problem" section below. Since [Cosmos DB supports Transactions](https://docs.dapr.io/reference/components-reference/supported-state-stores/), I was under the impression this should work out of the box. The expected behavior is that, after the sample makes a state transaction, a message should be published to the configured `outboxPublishPubsub` and `outboxPublishTopic` given by the state component. ## Actual Behavior The actual behavior is that no messages are sent. If I look in Azure Service Bus, I can see that `defaultorder-processorordersoutbox`, `defaultorder-processorordersoutbox`, and `orders` topics are created, but none of those topics have any messages published to them. ## Steps to Reproduce the Problem 1. Clone the [sample application for Transactional Outbox](https://github.com/dapr/samples/tree/master/outbox) and replace the following resource files with the given snippets: `resources/pubsub.yaml`: ```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: orderpubsub spec: type: pubsub.azure.servicebus.topics version: v1 metadata: - name: connectionString value: <CONNECTION-STRING> ``` `resources/statestore.yaml`: ```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: statestore spec: type: state.azure.cosmosdb version: v1 metadata: - name: url value: <COSMOS-URL> - name: masterKey value: <COSMOS-MASTER-KEY> - name: database value: Orders - name: collection value: Items - name: outboxPublishPubsub value: orderpubsub - name: outboxPublishTopic value: orders ``` (Everything else is unmodified.) 2. Run the applications using `dapr run -f .` as indicated in the instructions. 3. Observe that the messages that are supposed to be published as a result of the state transaction are not actually published. I have also tried replacing those with the SQLite storage component and the In-Memory pubsub component, and both of those appear to exhibit the same issue. ## Release Note <!-- How should the fix for this issue be communicated in our release notes? It can be populated later. --> <!-- Keep it as a single line. Examples: --> <!-- RELEASE NOTE: **ADD** New feature in Dapr. --> <!-- RELEASE NOTE: **FIX** Bug in runtime. --> <!-- RELEASE NOTE: **UPDATE** Runtime dependency. --> RELEASE NOTE:
3 条评论