Skip to content

Transactional outbox messages not being published in Outbox sample #221

Open
@stephenchristian-aveva

Description

@stephenchristian-aveva

In what area(s)?

/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 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, 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 and replace the following resource files with the given snippets:

resources/pubsub.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:

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.)

  1. Run the applications using dapr run -f . as indicated in the instructions.

  2. 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

RELEASE NOTE:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions