You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By configuring the state store, you can use the outbox pattern without any additional metadata in the requests. For example:
apiVersion: dapr.io/v1alpha1kind: Componentmetadata:
name: statestorespec:
type: state.redisversion: v1metadata:
- name: redisHostvalue: localhost:6379
- name: redisPasswordvalue: ""
- name: actorStateStorevalue: "true"
- name: outboxPublishPubsubvalue: "pubsub". # This is the pubsub component name
- name: outboxPublishTopicvalue: "test"
The additional metadata fields are needed to combine outbox and non-outbox messages on the same state store. Unfortunately, we currently don't support adding metadata for TransactionalStateOperation in the python-sdk, but I opened a PR here which will allow you to do something like:
Describe the issue
Example for outbox in python seems to be errored. It assumes we can, via python SDK, do:
but:
Indeed python SDK does not provide this
state
attribute.So I tried:
But despite my efforts in injecting metadatas, I could not see any outbox message in my outbox topic.
Only way I found to get a message in outbox topic is to use transactions:
I made this project where you can find full code and logs: https://github.com/jseguillon/dapr-outbox-python
URL of the docs
https://github.com/dapr/docs/blob/v1.14/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-outbox.md?plain=1#L205
Expected content
A working Python example for outbox with metadata like example for others langages
Screenshots
metadata:
transaction:
Additional context
The text was updated successfully, but these errors were encountered: