Closed chris-aeviator closed 1 year ago
Thanks for the suggestion! We are working on getting this added to Plumber this week
@chris-aeviator I'm trying to gauge how people might typically use this. Would the use-case just be a single flag, which unmarshals the JSON into a cloud event, and then uses the SDK's libs to ship the message correctly? Or would it also need flags for all the message options such as --id
, --subject
, --data-schema
, etc?
Also is there any functionality you are looking for on reads? Currently plumber exposes the message bus' headers and metadata, which should by default include the ce_*
attributes
Hi @chris-aeviator, can you check my previous reply. I want to make sure I grokked the intended behavior before releasing this. Thank you!
Sorry for the late reply - most fields are standardized (so the flag logic would be appropriate) but there’s also the possibility to add custom fields - for a standard use case this is optional though
Am 10.04.2023 um 16:03 schrieb Mark G. @.***>:
Hi @chris-aeviator, can you check my previous reply. I want to make sure I grokked the intended behavior before releasing this. Thank you!
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.
Perfect thank you! I'll get this feature released this week
@chris-aeviator Cloudevents support has landed in https://github.com/batchcorp/plumber/releases/tag/v2.3.0 It is currently supported for Kafka, NATS, NATS streaming, and NATS jetstream. Example usage is here: https://github.com/batchcorp/plumber/blob/master/docs/examples.md#publish-cloudevents
Let me know if you have any issues with the functionality
What would you like to see added? Cloudevents (https://cloudevents.io/) is a specification for describing event data in a common way. Cloud events are used in a variety of application platforms and are independent of the underlying transport layer, so plumber would be the ideal tool to send them from a terminal.
Use Case
When developing a service that expects cloudevents structured messages, plumber would act as the swiss army knife for sending them in an easy way.
Supported adapters are e.g.
more at https://github.com/cloudevents/spec#cloudevents-documents
Proposed Change
add a CLI flag
--cloudEvent
that turns--input {"data": {"userSignedUpEvent": ...}
into a cloudEventWho Benefits from the Change(s)?
All users working with the serverlessworkflow.io specification and cloudEvent users in general.
Additional context example of a cloud event message
sample python code to construct a cloud event