1- # Svix Bridge
1+ <h1 align =" center " >
2+ <a href =" https://www.svix.com " >
3+ <img width="120" src="https://avatars.githubusercontent.com/u/80175132?s=200&v=4" />
4+ <p align="center">Svix - Webhooks as a service</p>
5+ </a >
6+ </h1 >
27
3- ` svix-bridge ` is organized in terms of ** senders** and ** receivers** .
8+ ![ GitHub tag] ( https://img.shields.io/github/tag/svix/svix-webhooks.svg )
9+ [ ![ Build Status] ( https://github.com/svix/svix-webhooks/workflows/Bridge%20CI/badge.svg )] ( https://github.com/svix/svix-webhooks/actions )
10+ [ ![ Bridge Security] ( https://github.com/svix/svix-webhooks/actions/workflows/bridge-security.yml/badge.svg )] ( https://github.com/svix/svix-webhooks/actions/workflows/bridge-security.yml )
11+ [ ![ License] ( https://img.shields.io/badge/license-MIT-brightgreen.svg )] ( LICENSE )
12+ [ ![ Join our slack] ( https://img.shields.io/badge/Slack-join%20the%20community-blue?logo=slack&style=social )] ( https://www.svix.com/slack/ )
13+
14+ # Svix Bridge (beta)
15+
16+ Bridge is an agent to help integrate webhooks into your existing messaging infrastructure.
17+
18+ Bridge is organized in terms of ** senders** and ** receivers** .
419
520** Senders** are useful when you have a data source (an "input") such as a
621message queue and want to generate Svix webhooks from those messages.
722
823** Receivers** act as HTTP endpoints which wait for Svix webhooks to arrive, then
924publish the payload on to a specified "output."
1025
26+ ** Receivers** also (optionally) perform validation of the webhooks using Svix's signature verification.
27+
28+ Both ** senders** and ** receivers** are defined in terms of their input, and optional JavaScript transformation, and their output.
29+
1130Currently the supported Sender inputs and Receiver outputs are the following
1231messaging systems:
1332
@@ -16,13 +35,28 @@ messaging systems:
1635- Redis
1736- SQS
1837
19- ## Usage
38+ > Important to note that queues, exchanges, topics, etc should be created and configured independently,
39+ > prior to using launching Bridge. Bridge will not automatically attempt to create these resources, it will only try
40+ > (and fail) to read from or publish to the stream/queue in this case.
41+
42+
43+ ## Installation
44+
45+ Docker images are available on [ docker hub] ( https://registry.hub.docker.com/r/svix/svix-bridge )
2046
2147```
22- svix-bridge -c path/to/ svix-bridge.yaml
48+ $ docker pull svix/ svix-bridge
2349```
2450
25- ## Configuration
51+ If you don't want to use docker, see [ Building from Source] ( ../README.md#building-from-source ) .
52+
53+
54+
55+ # Usage and Configuration
56+
57+ ```
58+ $ svix-bridge -c path/to/svix-bridge.yaml
59+ ```
2660
2761The CLI itself exposes only a single flag (` -c ` , ` --cfg ` ) used to set the path for the config file.
2862The location of the config file can also be set with the ` SVIX_BRIDGE_CFG ` env var.
@@ -34,7 +68,6 @@ Each sender and receiver can optionally specify a `transformation`.
3468Transformations should define a function called ` handler ` that accepts an object and returns an object.
3569
3670Senders should produce JSON following an expected shape:
37-
3871```
3972{
4073 // This indicates which Svix application to send the message to
@@ -52,21 +85,36 @@ Senders should produce JSON following an expected shape:
5285> The comments in the above JSON are for illustrative purposes only ;)
5386> That's not valid JSON! Sorry!
5487
55-
5688For detail on the ` message ` field, see: < https://api.svix.com/docs#tag/Message/operation/v1.message.create >
5789
58- Important to note that queues, exchanges, topics, or what have you, should be created and configured independently,
59- prior to using the plugin. There's nothing in place to automatically create these resources.
60- The plugin will only try (and fail) to read from the stream in such a case.
90+ See the example configs for how to configure each input and output in more detail:
91+ - [ senders ] ( ./svix-bridge.example.senders.yaml )
92+ - [ receivers ] ( ./svix-bridge.example.receivers.yaml )
6193
62- - GCP Pub/Sub
63- - RabbitMQ
64- - Redis
65- - SQS
94+ # Building from source
6695
67- The HTTP server also (optionally) performs validation of the webhooks using Svix's signature verification method.
96+ You would need a working Rust compiler in order to build Svix Bridge.
97+ The easiest way is to use [ rustup] ( https://rustup.rs/ ) .
6898
69- The ` verification ` section for each route can be set one of two ways:
70- * ` none ` which accepts and forwards any JSON POST HTTP request.
71- * ` svix ` that takes a Svix endpoint secret (starting with ` whsec_ ` ) and
72- validating it using an official Svix library
99+ ```
100+ # Clone the repository
101+ git clone https://github.com/svix/svix-webhooks
102+ # Change to the source directory
103+ cd svix-webhooks/bridge/
104+ # Build
105+ cargo install --path svix-bridge
106+ ```
107+
108+ Some system dependencies are required for Bridge to build successfully.
109+ Consult the [ Dockerfile] ( ./Dockerfile ) for a good reference of what's required at build time.
110+
111+ # Building with Docker
112+
113+ ```
114+ # Clone the repository
115+ git clone https://github.com/svix/svix-webhooks
116+ # Change to the source directory
117+ cd svix-webhooks/bridge/
118+ # Build
119+ docker build --tag svix-bridge:local .
120+ ```
0 commit comments