{"id":16260037,"url":"https://github.com/cludden/benthos-plugin-temporal","last_synced_at":"2025-04-08T13:49:51.386Z","repository":{"id":246835197,"uuid":"822310645","full_name":"cludden/benthos-plugin-temporal","owner":"cludden","description":"a Temporal integration for benthos/redpanda-connect/bento","archived":false,"fork":false,"pushed_at":"2024-07-03T21:40:57.000Z","size":166,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T10:18:03.625Z","etag":null,"topics":["benthos","benthos-plugin","bento","redpanda","temporal"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cludden.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-30T22:03:31.000Z","updated_at":"2025-01-17T06:25:10.000Z","dependencies_parsed_at":"2024-07-09T10:30:53.113Z","dependency_job_id":null,"html_url":"https://github.com/cludden/benthos-plugin-temporal","commit_stats":null,"previous_names":["cludden/benthos-plugin-temporal"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cludden%2Fbenthos-plugin-temporal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cludden%2Fbenthos-plugin-temporal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cludden%2Fbenthos-plugin-temporal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cludden%2Fbenthos-plugin-temporal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cludden","download_url":"https://codeload.github.com/cludden/benthos-plugin-temporal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247854807,"owners_count":21007421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benthos","benthos-plugin","bento","redpanda","temporal"],"created_at":"2024-10-10T16:06:07.011Z","updated_at":"2025-04-08T13:49:51.362Z","avatar_url":"https://github.com/cludden.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# benthos-plugin-temporal\n\nA [Temporal](https://temporal.io) integration for benthos/[redpanda-connect](https://docs.redpanda.com/redpanda-connect/about/)/[bento](https://warpstreamlabs.github.io/bento/).\n\nEasily execute Temporal workflows from:\n\n\u003e  `amqp`, `aws_kinesis`, `aws_s3`, `aws_sqs`, `azure_blob_storage`,\n\u003e  `azure_cosmosdb`, `azure_queue_storage`, `azure_table_storage`, `beanstalkd`, \n\u003e  `cassandra`, `discord`, `gcp_bigquery_select`, `gcp_cloud_storage`, `gcp_pubsub`, \n\u003e  `hdfs`, `kafka` , `mongodb`, `mqtt`, `nats`, `nats_jetstream`, `nsq`, `pulsar`, \n\u003e  `redis_list`, `redis_pubsub`, `redis_scan`, `redis_streams`, `sftp`, `sql`,\n\u003e  `twitter`, `webhooks`, and more!\n\n## Getting Started\n\nLaunch a webhook server for executing dynamic workflows:\n\n1. Import this plugin\n  - [Redpanda Connect](https://docs.redpanda.com/redpanda-connect/about/)\n    ```go\n    // in main.go\n    package main\n\n    import (\n        _ \"github.com/cludden/benthos-plugin-temporal/pkg/connect/all\"\n        \"github.com/redpanda-data/benthos/v4/public/service\"\n        _ \"github.com/redpanda-data/connect/public/bundle/free/v4\"\n    )\n\n    func main() {\n        service.RunCLI(context.Background())\n    }\n    ```\n  - [Bento](https://warpstreamlabs.github.io/bento/)\n    ```go\n    // in main.go\n    package main\n\n    import (\n        _ \"github.com/cludden/benthos-plugin-temporal/pkg/bento/all\"\n        _ \"github.com/warpstreamlabs/bento/public/components/all\"\n\t      \"github.com/warpstreamlabs/bento/public/service\"\n    )\n\n    func main() {\n        service.RunCLI(context.Background())\n    }\n    ```\n2. Use plugin in stream configuration\n```yaml\n# in config.yml\ninput:\n  http_server:\n    address: 0.0.0.0:8080\n    path: /temporal\n\npipeline:\n  processors:\n    # extract task_queue, workflow_type, and workflow_id from http headers, query parameters, or json payload\n    - mapping: |\n        root = this.without(\"@task_queue\", \"@workflow_type\", \"@workflow_id\")\n        root.\"@metadata\" = @\n        meta task_queue = @.\"task_queue\".or(this.\"@task_queue\").or(\"example\")\n        meta workflow_id = @.\"workflow_id\".or(this.\"@workflow_id\").or(\"example/%s\".format(uuid_v4()))\n        meta workflow_type = @.\"workflow_type\".or(this.\"@workflow_type\").or(\"example\")\n\noutput:\n  temporal_workflow:\n    address: localhost:7233\n    task_queue: '${! @.task_queue }'\n    workflow_id: '${! @.workflow_id }'\n    workflow_type: '${! @.workflow_type }'\n```\n3. Start Temporal server\n```shell\ntemporal server start-dev\n```\n4. In a separate terminal, run the application\n```shell\ngo run main.go -c config.yml\n```\n5. In a separate terminal, trigger a workflow\n```shell\ncurl http://localhost:8080/temporal \\\n  -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"@task_queue\":\"example\",\"@workflow_type\":\"example\",\"foo\":\"bar\"}' \n```\n\n## Examples\n\nSee the [example](./example/) directory for complete examples.\n\n## Resources\n\n### Processors\n\n#### verify_hmac_sha256\n\nsecurely verifies an hmac_sha256 signature without leaking timing information\n\n##### Fields\n\n- secret (`\u003cInterpolatedString\u003e`) - hmac secret\n- signature (`\u003cInterpolatedString\u003e`) - signature to verify (excluding any prefix/suffix)\n- string_to_sign (`\u003cMapping\u003e`) - string to sign\n\n##### Example\n\n**GitHub Webhook:**\n\n```yaml\ninput:\n  http_server:\n    path: /post\n\npipeline:\n  processors:\n    - verify_hmac_sha256:\n        secret: '${! env(\"WEBHOOK_SECRET\") }'\n        signature: '${! @.\"X-Hub-Signature-256\".trim_prefix(\"sha256=\") }'\n        string_to_sign: root = content()\n\noutput:\n  reject_errored:\n    sync_response: {}\n```\n\n**Slack Request:**\n\n```yaml\ninput:\n  http_server:\n    path: /post\n\npipeline:\n  processors:\n    - verify_hmac_sha256:\n        secret: '${! env(\"WEBHOOK_SECRET\") }'\n        signature: '${! @.\"X-Slack-Signature\".trim_prefix(\"v0=\") }'\n        string_to_sign: root = \"v0:%s:%s\".format(@.\"X-Slack-Request-Timestamp\", content())\n\noutput:\n  reject_errored:\n    sync_response: {}\n```\n\n### Outputs\n\n#### temporal_workflow\n\nexecutes a Temporal workflow for each message as input\n\n##### Fields\n\n- address `\u003cstring\u003e` - temporal cluster address\n- codec_auth `[string]` - codec endpoint authorization header\n- codec_endpoint `[string]` - remote codec server endpoint\n- detach `[InterpolatedString]` - boolean indicating whether the output should wait for workflow completion before acknowleding a message\n- namespace `[string]` - temporal namespace name\n- search_attributes `[Mapping]` - bloblang mapping defining workflow search attributes\n- task_queue `\u003cInterpolatedString\u003e` - temporal worker task queue name\n- tls.ca_data `[string]` - pem-encoded ca data\n- tls.ca_file `[string]` - path to pem-encoded ca certificate\n- tls.cert_data `[string]` - pem-encoded client certificate data\n- tls.cert_file `[string]` - path to pem-encoded client certificate\n- tls.disable_host_verification `[bool]` - disables tls host verification\n- tls.key_data `[string]` - pem-encoded client private key\n- tls.key_file `[string]` - path to pem-encoded client private key\n- tls.server_name `[string]` - overrides target tls server name\n- workflow_id `\u003cInterpolatedString\u003e` - temporal workflow id\n- workflow_type `\u003cInterpolatedString\u003e` - temporal workflow type\n\n##### Example\n\n```yaml\noutput:\n  temporal_workflow:\n    address: localhost:7233\n    task_queue: example\n    workflow_id: test/${! uuid_v4() }\n    workflow_type: ${! @.workflow_type.or(this.\"@workflow_type\").or(\"test\") }\n```\n\n## License\nLicensed under the [MIT License](LICENSE.md)  \nCopyright (c) 2024 Chris Ludden\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcludden%2Fbenthos-plugin-temporal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcludden%2Fbenthos-plugin-temporal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcludden%2Fbenthos-plugin-temporal/lists"}