Your first event, end to end
This tutorial takes one event the whole way: your application writes it, the platform stores it, matches it to a subscription, and delivers it, signed, to an HTTP endpoint you run. By the end you will have used each of the pieces an application normally touches:
- an application and its service account (the credentials your code uses);
- definition sync: an event type, a connection and a subscription declared in code;
- the transactional outbox and the
fcdev outboxrelay; - a webhook receiver that verifies the delivery’s signature;
- the console’s events and dispatch jobs pages.
It takes about twenty minutes. Pick your language in any code tab; the choice carries through the page (and the rest of the site).
sequenceDiagram participant App as Your app participant DB as App database participant Relay as fcdev outbox participant FC as Platform (fcdev) participant Hook as Your webhook receiver App->>FC: definition sync (event type, connection, subscription) App->>DB: one transaction: business change + outbox row Relay->>DB: claim pending rows Relay->>FC: POST /api/events/batch FC->>FC: store event, match subscription, create dispatch job FC->>Hook: POST, signed with the connection's service account Hook-->>FC: 200
Before you start
Section titled “Before you start”-
fcdevinstalled and running: Install and run fcdev. -
A PostgreSQL database for your application. If you have none to hand, create one on fcdev’s embedded server (it is deleted if you ever reset the embedded database):
Terminal window psql "postgresql://postgres:postgres@localhost:15432/flowcatalyst" -c 'CREATE DATABASE orders' -
The SDK for your language:
go get github.com/flowcatalyst/go-sdk@v0.7.0Go 1.27 or later. The module is served by the Go module proxy.
The Java SDK is published, from 0.0.30, to the platform repository’s GitHub Packages Maven registry, not
Maven Central. Add the repository to your pom.xml (and a github-flowcatalyst server entry with a
read:packages token to ~/.m2/settings.xml):
<repository> <id>github-flowcatalyst</id> <url>https://maven.pkg.github.com/flowcatalyst/flowcatalyst</url></repository>Then depend on io.flowcatalyst:flowcatalyst-sdk:0.0.38 (Java 25 or later). To build it yourself instead,
clone the tag java-sdk/v0.0.38 and run mvn install -DskipTests in clients/java-sdk. This tutorial also
uses the PostgreSQL JDBC driver (org.postgresql:postgresql).
npm install github:flowcatalyst/typescript-sdk#v0.29.0 pgThe package is @flowcatalyst/sdk, installed from its repository’s tag, not from the npm
registry.
composer config repositories.flowcatalyst vcs https://github.com/flowcatalyst/laravel-sdkcomposer require flowcatalyst/laravel-sdk:^0.18php artisan vendor:publish --tag=flowcatalyst-configLaravel 10 to 13 on PHP 8.1 or later. The package comes from its repository’s tags, not from Packagist.
The Rust SDK is not released yet (publish = false). To try it, depend on it by path from a
checkout of the platform repository (clients/rust-sdk), with the features client,
outbox-postgres and webhook.
1. Create the application
Section titled “1. Create the application”In your project directory, run:
fcdev init --code orders --name "Orders"fcdev init connects to the running fcdev database and:
- creates the Orders application (code
orders); - reuses or creates a Default Client (identifier
default) and prints its id; - provisions the application’s service account, code
app:orders, named “Orders Service Account”, with theplatform:application-servicerole, confined to this one application; - creates a confidential OAuth client for it (the
client_credentialsgrant); - writes the credentials into
./.env:
FLOWCATALYST_BASE_URL=http://localhost:8080FLOWCATALYST_APP_CODE=ordersFLOWCATALYST_CLIENT_ID=...FLOWCATALYST_CLIENT_SECRET=...FLOWCATALYST_SIGNING_SECRET=...FLOWCATALYST_WEBHOOK_AUTH_TOKEN=...FLOWCATALYST_APP_KEY=...The client secret is shown only here: the platform keeps a hash. The signing secret and the webhook
auth token are the service account’s delivery credentials (see the next step). Keep .env out of version
control. If fcdev init asks for an administrator, the database has no anchor user yet; fcdev
normally creates one on start, so check that fcdev is running.
Two rules come with these credentials, and the rest of the tutorial follows them:
- every event type the application publishes must start with
orders:; anything else is refused with400, because it belongs to another application; - event types are registered through definition sync, not the general event-type admin API, which this role cannot use.
See applications and integrations and principals for what was just created.
2. Check the signing secret and set the database URL
Section titled “2. Check the signing secret and set the database URL”Every delivery is signed with the signing secret of a service account; for this tutorial, the
application’s own (see who signs a delivery).
fcdev init already wrote it to .env as FLOWCATALYST_SIGNING_SECRET, with the bearer token the
platform sends beside it as FLOWCATALYST_WEBHOOK_AUTH_TOKEN. Open .env and check that the signing
secret is there. The receiver in the next step reads it from there.
Then add your application database’s URL to .env:
FC_OUTBOX_SOURCE_DB_URL=postgresql://postgres:postgres@localhost:15432/orders?sslmode=disableThe platform shows a signing secret only when it creates or regenerates it, so if you ran fcdev init
earlier and .env has no FLOWCATALYST_SIGNING_SECRET (an application that already existed, or an
.env you replaced), run it again for the same code with the regenerate flag:
fcdev init --code orders --regenerate-signing-secretThis replaces the service account’s signing secret and writes the new one to .env. A running copy of
the application that verifies with the old secret refuses every delivery until it restarts with the new
one. You can also regenerate it in the console (Service accounts, Orders Service Account,
Signing Secret (HMAC-SHA256), Regenerate Secret; the value is shown once), or with
POST /api/service-accounts/{id}/regenerate-signing-secret, which answers { "id", "signingSecret" }.
3. Run a webhook receiver
Section titled “3. Run a webhook receiver”The receiver is the consumer: an HTTP endpoint that verifies the signature over the raw request
body before it trusts anything, then answers 200. It must read the body as bytes; parsing and
re-serialising JSON changes the bytes and breaks the signature.
package main
import ( "io" "log" "net/http" "os"
"github.com/flowcatalyst/go-sdk/webhook")
func main() { verifier := webhook.NewVerifier(os.Getenv("FLOWCATALYST_SIGNING_SECRET"))
http.HandleFunc("POST /webhooks/orders", func(w http.ResponseWriter, r *http.Request) { body, err := io.ReadAll(r.Body) // the raw bytes, before any parsing if err != nil { http.Error(w, "read body", http.StatusBadRequest) return } if err := verifier.Verify(body, r.Header.Get(webhook.SignatureHeader), r.Header.Get(webhook.TimestampHeader)); err != nil { http.Error(w, "invalid signature", http.StatusUnauthorized) return } log.Printf("job %s (%s): %s", r.Header.Get("X-Dispatch-Job-Id"), r.Header.Get("X-Event-Type"), body) w.WriteHeader(http.StatusOK) }) log.Fatal(http.ListenAndServe(":3000", nil))}import com.sun.net.httpserver.HttpServer;import io.flowcatalyst.sdk.webhook.WebhookSignature;import java.net.InetSocketAddress;
public class Receiver { public static void main(String[] args) throws Exception { String secret = System.getenv("FLOWCATALYST_SIGNING_SECRET"); var server = HttpServer.create(new InetSocketAddress(3000), 0); server.createContext("/webhooks/orders", exchange -> { byte[] body = exchange.getRequestBody().readAllBytes(); // raw bytes var headers = exchange.getRequestHeaders(); int status = 200; try { WebhookSignature.verify(body, headers.getFirst("X-FlowCatalyst-Signature"), headers.getFirst("X-FlowCatalyst-Timestamp"), secret); System.out.printf("job %s (%s): %s%n", headers.getFirst("X-Dispatch-Job-Id"), headers.getFirst("X-Event-Type"), new String(body)); } catch (WebhookSignature.WebhookSignatureException e) { status = 401; } exchange.sendResponseHeaders(status, -1); exchange.close(); }); server.start(); }}import { createServer } from "node:http";import { verifyDeliverySignature, WebhookSignatureError } from "@flowcatalyst/sdk";
createServer((req, res) => { const chunks: Buffer[] = []; req.on("data", (c) => chunks.push(c)); req.on("end", () => { const rawBody = Buffer.concat(chunks); // the raw bytes, before any parsing try { verifyDeliverySignature({ rawBody, signature: req.headers["x-flowcatalyst-signature"], timestamp: req.headers["x-flowcatalyst-timestamp"], secret: process.env.FLOWCATALYST_SIGNING_SECRET!, }); } catch (e) { if (e instanceof WebhookSignatureError) { res.writeHead(401).end(e.code); return; } throw e; } console.log(`job ${req.headers["x-dispatch-job-id"]}:`, JSON.parse(rawBody.toString())); res.writeHead(200).end(); });}).listen(3000);// routes/api.php (Laravel 11+: create it with `php artisan install:api`)use Illuminate\Http\Request;use Illuminate\Support\Facades\Log;use Illuminate\Support\Facades\Route;
// The flowcatalyst.webhook middleware verifies the signature with// FLOWCATALYST_SIGNING_SECRET and refuses the request when it does not match.Route::post('/webhooks/orders', function (Request $request) { Log::info('FlowCatalyst delivery', [ 'job' => $request->header('X-Dispatch-Job-Id'), 'body' => $request->json()->all(), ]); return response()->noContent(200);})->middleware('flowcatalyst.webhook');Serve it with php artisan serve (port 8000). The endpoint is
http://localhost:8000/api/webhooks/orders.
// axum 0.8; the SDK's webhook module is framework-free.use axum::{body::Bytes, http::{HeaderMap, StatusCode}, routing::post, Router};use flowcatalyst_sdk::webhook::{WebhookVerifier, SIGNATURE_HEADER, TIMESTAMP_HEADER};use std::sync::Arc;
#[tokio::main]async fn main() -> Result<(), Box<dyn std::error::Error>> { let verifier = Arc::new(WebhookVerifier::from_env()?); // FLOWCATALYST_SIGNING_SECRET let app = Router::new().route("/webhooks/orders", post(move |headers: HeaderMap, body: Bytes| { let verifier = verifier.clone(); async move { let sig = headers.get(SIGNATURE_HEADER).and_then(|v| v.to_str().ok()); let ts = headers.get(TIMESTAMP_HEADER).and_then(|v| v.to_str().ok()); if verifier.verify(&body, sig, ts).is_err() { return StatusCode::UNAUTHORIZED; } println!("delivery: {}", String::from_utf8_lossy(&body)); StatusCode::OK } })); let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await?; axum::serve(listener, app).await?; Ok(())}Start it with FLOWCATALYST_SIGNING_SECRET in its environment (or loaded from .env). fcdev
allows deliveries to localhost; a deployed platform does not, so there the endpoint must be
reachable on a real address.
4. Declare the event type, connection and subscription
Section titled “4. Declare the event type, connection and subscription”An application declares what it owns in code and syncs it: the platform makes its rows match. This set has three things:
- the event type
orders:sales:order:placed; - a connection
orders-webhooks, owned by the application (its service account signs); - a subscription
order-placed-localthat sendsorders:sales:order:placedevents to your receiver, through that connection.
Run the sync once now. In a real application it runs on each deploy.
package main
import ( "context" "log" "os"
"github.com/flowcatalyst/go-sdk/auth" "github.com/flowcatalyst/go-sdk/client" "github.com/flowcatalyst/go-sdk/sync")
func main() { base := os.Getenv("FLOWCATALYST_BASE_URL") cc := auth.NewClientCredentialsProvider(auth.ClientCredentialsConfig{ IssuerURL: base, ClientID: os.Getenv("FLOWCATALYST_CLIENT_ID"), ClientSecret: os.Getenv("FLOWCATALYST_CLIENT_SECRET"), }) c := client.New(base, client.WithTokenProvider(cc.Token))
set := sync.ForApplication("orders"). AddEventType(sync.MakeEventType("orders:sales:order:placed", "Order placed")). AddConnection(sync.MakeConnection("orders-webhooks", "Orders webhooks")). AddSubscription(sync.MakeSubscription("order-placed-local", "Order placed (local)", "http://localhost:3000/webhooks/orders"). WithConnectionCode("orders-webhooks"). Bind("orders:sales:order:placed", ""))
res := sync.NewSynchronizer(c).Sync(context.Background(), set, sync.DefaultOptions()) if res.HasErrors() { log.Fatal(res.Errors()) } log.Println("synced")}import io.flowcatalyst.sdk.FlowCatalystClient;import io.flowcatalyst.sdk.sync.Definitions;import java.util.List;
var client = FlowCatalystClient.builder() .baseUrl(System.getenv("FLOWCATALYST_BASE_URL")) .clientCredentials(System.getenv("FLOWCATALYST_CLIENT_ID"), System.getenv("FLOWCATALYST_CLIENT_SECRET")) .build();
var set = Definitions.DefinitionSet.define("orders") .withEventTypes(List.of( Definitions.EventType.of("orders:sales:order:placed", "Order placed"))) .withConnections(List.of( Definitions.Connection.of("orders-webhooks", "Orders webhooks"))) .withSubscriptions(List.of(Definitions.Subscription.of( "order-placed-local", "Order placed (local)", "http://localhost:3000/webhooks/orders", List.of(Definitions.SubscriptionEventType.of("orders:sales:order:placed"))) .withConnectionCode("orders-webhooks")));
client.definitions().sync(set); // throws DefinitionSyncException if a category failedimport { FlowCatalystClient, sync } from "@flowcatalyst/sdk";
const client = new FlowCatalystClient({ baseUrl: process.env.FLOWCATALYST_BASE_URL!, clientId: process.env.FLOWCATALYST_CLIENT_ID!, clientSecret: process.env.FLOWCATALYST_CLIENT_SECRET!,});
const definitions = sync .defineApplication("orders") .withEventTypes([{ code: "orders:sales:order:placed", name: "Order placed" }]) .withConnections([{ code: "orders-webhooks", name: "Orders webhooks" }]) .withSubscriptions([ { code: "order-placed-local", name: "Order placed (local)", target: "http://localhost:3000/webhooks/orders", connectionCode: "orders-webhooks", eventTypes: [{ eventTypeCode: "orders:sales:order:placed" }], }, ]) .build();
const result = await client.definitions().sync(definitions);if (result.isErr()) throw new Error(`sync failed: ${result.error.message}`);Definitions are PHP attributes on classes under app/FlowCatalyst (the default scan path; add
other directories to flowcatalyst.definitions.paths).
use FlowCatalyst\Attributes\AsEventType;
// Synced as "orders:sales:order:placed": the application prefix comes from FLOWCATALYST_APP_CODE.#[AsEventType(subdomain: 'sales', aggregate: 'order', event: 'placed', name: 'Order placed')]final class OrderPlaced {}use FlowCatalyst\Attributes\{AsConnection, AsDispatchPool, AsSubscription};
#[AsConnection(code: 'orders-webhooks', name: 'Orders webhooks')]final class OrdersWebhooksConnection {}
#[AsDispatchPool(code: 'orders-default', name: 'Orders')]final class OrdersPool {}
#[AsSubscription( code: 'order-placed-local', name: 'Order placed (local)', target: 'http://localhost:8000/api/webhooks/orders', connectionCode: 'orders-webhooks', queue: 'default', // required by the attribute; not sent to the platform dispatchPoolCode: 'orders-default', eventTypes: ['orders:sales:order:placed'],)]final class OrderPlacedLocalSubscription {}php artisan flowcatalyst:scan # find the attributed classesphp artisan flowcatalyst:sync # push them with FLOWCATALYST_CLIENT_ID / _SECRETuse flowcatalyst_sdk::client::{ClientCredentials, FlowCatalystClient};use flowcatalyst_sdk::sync::{ ConnectionDefinition, DefinitionSet, DefinitionSynchronizer, EventTypeDefinition, SubscriptionBinding, SubscriptionDefinition, SyncOptions,};use std::env;
let base = env::var("FLOWCATALYST_BASE_URL")?;let client = FlowCatalystClient::new(&base).with_token_source(ClientCredentials::new( &base, env::var("FLOWCATALYST_CLIENT_ID")?, env::var("FLOWCATALYST_CLIENT_SECRET")?,));
let set = DefinitionSet::for_application("orders") .add_event_type(EventTypeDefinition::make("orders:sales:order:placed", "Order placed")) .add_connection(ConnectionDefinition::make("orders-webhooks", "Orders webhooks")) .add_subscription( SubscriptionDefinition::make( "order-placed-local", "Order placed (local)", "http://localhost:3000/webhooks/orders", ) .with_connection_code("orders-webhooks") .add_event_type(SubscriptionBinding::make("orders:sales:order:placed")), );
DefinitionSynchronizer::new(client) .sync(&set, &SyncOptions::default()) .await .into_result()?;Sync runs one call per category in dependency order (event types, then connections, then
subscriptions), so the subscription can name a connection created in the same run. Every
application-owned connection is signed by the application’s service account, the one whose secret
is in your .env from step 2. In the console, Event types, Connections and Subscriptions now
show the three rows, marked as coming from code. More on this in
Declare definitions in code.
5. Publish the event through the outbox
Section titled “5. Publish the event through the outbox”Your application does not call the platform to publish. It writes the event as a row in an
outbox_messages table in its own database, in the same transaction as the business change, so
the event exists if and only if the change committed. See the transactional outbox
for why.
Create the table once. fcdev outbox create-table reads FC_OUTBOX_SOURCE_DB_URL from ./.env:
fcdev outbox create-table(Each SDK also ships the same table as a migration; both produce the same schema.) Then write the event:
In Go the event is written by a use case: one business operation that returns a plan, which
usecaseop.Run applies in one transaction (the order row and the event row together).
examples/order-service in the SDK is the complete, runnable version of this sketch.
// The event: usecase.DomainEvent, usually by embedding usecase.EventMetadata.type OrderPlaced struct { Meta usecase.EventMetadata OrderID string `json:"orderId"`}func (e OrderPlaced) EventID() string { return e.Meta.EventID }func (e OrderPlaced) EventType() string { return e.Meta.Type }// ... SpecVersion, Source, Subject, Time, PrincipalID, CorrelationID,// CausationID, ExecutionID and MessageGroup delegate to Meta the same way.func (e OrderPlaced) ToDataJSON() ([]byte, error) { return json.Marshal(map[string]string{"orderId": e.OrderID})}
func PlaceOrder(repo OrderRepository) usecaseop.Operation[PlaceOrderCommand, OrderPlaced] { return usecaseop.Operation[PlaceOrderCommand, OrderPlaced]{ Name: "PlaceOrder", Validate: func(context.Context, PlaceOrderCommand) error { return nil }, Authorize: usecaseop.Public[PlaceOrderCommand], Execute: func(_ context.Context, cmd PlaceOrderCommand, ec usecase.ExecutionContext) (usecaseop.Plan[OrderPlaced], error) { order := &Order{ID: tsid.GenerateWithPrefix("ord")} meta := usecase.NewEventMetadata(ec, "orders:sales:order:placed", "orders:sales", usecase.BuildSubject("sales", "order", order.ID)) meta.MessageGroup = usecase.BuildMessageGroup("sales", "order", order.ID) return usecaseop.Save(order, repo, OrderPlaced{Meta: meta, OrderID: order.ID}), nil }, }}
// wiring: the pgx sink writes outbox_messages rows on the use case's transactionsink := outboxpgx.NewSink(outboxpgx.Config{ApplicationCode: "orders"})uow := usecasepgx.New(pool, sink)event, err := usecaseop.Run(ctx, uow, PlaceOrder(repo), PlaceOrderCommand{}, usecase.NewExecutionContext("tutorial"))import io.flowcatalyst.sdk.outbox.CreateEventDto;import io.flowcatalyst.sdk.outbox.JdbcOutboxDriver;import io.flowcatalyst.sdk.outbox.OutboxManager;import java.sql.Connection;import java.util.Map;import org.postgresql.ds.PGSimpleDataSource;
var dataSource = new PGSimpleDataSource();dataSource.setURL("jdbc:postgresql://localhost:15432/orders?user=postgres&password=postgres");
var driver = new JdbcOutboxDriver(dataSource);var outbox = new OutboxManager(driver, "<default client id from fcdev init>");String orderId = "ord_" + System.currentTimeMillis();
driver.withTransaction(tx -> { // your business writes go on the same connection: (Connection) tx outbox.createEvent(CreateEventDto .create("orders:sales:order:placed", Map.of("orderId", orderId)) .withMessageGroup("sales:order:" + orderId), tx); return null;});import { Pool } from "pg";import { CreateEventDto, OutboxManager, PgOutboxDriver } from "@flowcatalyst/sdk";
const driver = new PgOutboxDriver(new Pool({ connectionString: process.env.FC_OUTBOX_SOURCE_DB_URL }));const outbox = new OutboxManager(driver, "<default client id from fcdev init>");const orderId = `ord_${Date.now()}`;
await driver.withTransaction(async (tx) => { // your business writes go on tx, e.g. await tx.query("INSERT INTO orders ...") await outbox.createEvent( CreateEventDto.create("orders:sales:order:placed", { orderId }) .withMessageGroup(`sales:order:${orderId}`), tx, );});Point Laravel’s database connection at the same database (DB_CONNECTION=pgsql, port 15432,
database orders). The outbox writes on that connection, so DB::transaction covers both.
use FlowCatalyst\Facades\Outbox;use FlowCatalyst\Outbox\DTOs\CreateEventDto;use Illuminate\Support\Facades\DB;
DB::transaction(function () { $orderId = 'ord_'.now()->getTimestampMs(); // your business writes here, e.g. Order::create([...]) Outbox::createEvent( CreateEventDto::create( type: 'orders:sales:order:placed', data: ['orderId' => $orderId], )->withMessageGroup("sales:order:{$orderId}") );});use flowcatalyst_sdk::outbox::{CreateEventDto, OutboxManager, PgOutboxDriver};use serde_json::json;
let pool = sqlx::PgPool::connect(&std::env::var("FC_OUTBOX_SOURCE_DB_URL")?).await?;let driver = PgOutboxDriver::new(pool.clone());let outbox = OutboxManager::new(driver.clone(), "<default client id from fcdev init>")?;
let order_id = flowcatalyst_sdk::tsid::generate_with_prefix("ord");let event = CreateEventDto::new("orders:sales:order:placed", &json!({ "orderId": order_id }))? .message_group(format!("sales:order:{order_id}"));
let mut tx = pool.begin().await?;// ... your business writes on &mut *tx ...driver.insert_in(&mut tx, &[outbox.prepare_event(&event)?]).await?;tx.commit().await?;The second argument of the outbox manager in Java, TypeScript and Rust is the value of the row’s
client_id column: use the default client’s id that fcdev init printed. It labels the row in your
table and is not sent with the event. The message group is the ordering key: events of one group
are delivered in order (ordering).
The row now waits in your table. Nothing has reached the platform yet.
6. Run the outbox relay
Section titled “6. Run the outbox relay”fcdev outbox is the relay that drains your table. It reads ./.env, connects to
FC_OUTBOX_SOURCE_DB_URL, mints a token with FLOWCATALYST_CLIENT_ID and
FLOWCATALYST_CLIENT_SECRET, and posts to http://localhost:8080 (override with
FC_OUTBOX_PLATFORM_URL). In a new terminal, in the project directory:
fcdev outboxIt logs auth=client_credentials when it starts, then claims the pending row, posts it to
POST /api/events/batch, and deletes it once the platform accepts it. Leave it running: it is
what your application runs beside itself, in development and in production. Run one relay per
outbox table.
7. Watch the delivery arrive
Section titled “7. Watch the delivery arrive”Within a second or two your receiver logs the delivery. The body is the JSON envelope (the default for a new subscription):
{ "attemptNumber": 1, "data": { "orderId": "ord_..." }, "id": "<dispatch job id>", "messageGroup": "sales:order:ord_...", "source": "orders:sales", "time": "2026-11-10T09:15:02.481Z", "type": "orders:sales:order:placed"}(plus dataContentType, subject, correlationId, clientId and clientCode when the job has
them), with the headers X-Dispatch-Job-Id, X-Event-Type, X-FlowCatalyst-Timestamp,
X-FlowCatalyst-Signature and Authorization: Bearer .... Answering 200 completes the job. What
other answers do (ack: false to defer, 429, 5xx for a retry) is in
delivery.
Then look in the console:
- Events (
/ui/events): the stored event, with its type, source, message group and data. - Dispatch jobs (
/ui/dispatch-jobs): one job for the subscription,COMPLETED, with the attempt, its status code and timing. The list shows a recent time window; widen it to see older jobs.
If nothing arrives
Section titled “If nothing arrives”| Symptom | Likely cause |
|---|---|
| The relay logs an error for the row | The event type does not start with orders: (refused, and the row blocks its group), or the credentials in .env are wrong. |
| The event is in the console but there is no dispatch job | The event type or the subscription is missing, or the subscription is paused. Check the sync’s result. |
The job is FAILED with a connection error |
The receiver is not running, or listens on another port or path than the subscription’s target. |
The job is FAILED with 401 |
The receiver refused the signature: FLOWCATALYST_SIGNING_SECRET is not the secret in .env from step 2 (regenerating it replaces it, so restart the receiver afterwards). |
The job stays PENDING |
The connection is paused, or fcdev was started with the router or dispatch scheduler off. |
A failed job is kept, with every attempt, until you act on it: fix the cause and use Requeue on the job’s page.
What you built
Section titled “What you built”- Code owns the definitions. The event type, connection and subscription live in your code and are synced on deploy; codes, not ids, make the same definitions work in every environment.
- The outbox makes publishing atomic with your data, and the relay delivers at least once (with deduplication on the platform side).
- Each subscription gets its own dispatch job, with retries, ordering per message group, and an audit trail of attempts.
- The consumer trusts nothing it has not verified: the signature binds the secret, the time and the exact bytes.
- Sign users in with FlowCatalyst.
- Your first function: run code on the platform instead of in your own service.
- How-tos: publish events, receive webhooks, declare definitions in code.
- Concepts: the messaging pipeline, dispatch jobs, subscriptions and connections.