Prerequisites
Before you start, make sure you have:- A connector repository scaffolded from the connector template. For more information, see Set up the project.
- Sync Hub deployed in your target runtime, with a topic for your events. For more information, see Sync Hub deployment and configuration.
- The vendor’s webhook documentation, including the payload schema and any signature or secret mechanism.
- Java and Maven installed for local builds.
Build the connector
-
Expose the webhook endpoint. Inbound connectors on Grand Central expose REST endpoints for vendor callbacks, for example
POST /webhooks/identity-verifications. Define an endpoint path that matches the vendor’s callback configuration. - Validate incoming requests. Verify the vendor’s signature or shared secret before you process the payload, and reject requests that fail validation. Return an acknowledgment status code promptly so the vendor doesn’t retry while you process.
-
Transform the vendor payload into your event contract. The event body needs a top-level
dataobject. For envelope fields, see Event envelope. -
Set the Sync Hub properties in the connector’s
application.propertiesfile:The template route builds the publish endpoint as${asb.producer.apiUri}/${asb.event.topic}/publishand sets thebbEventTypeheader fromasb.event.type. The template hardcodes theeventSourceheader and deriveseventVersionfrom the payload schema. In a production connector, set these headers from your own configuration, for example with theasb.event.sourceandasb.event.versionproperties. SetidentifierandtraceParentper request, because they change for each webhook delivery. Theasb.event.typevalue shown is an example. Use the event spec class that matches your event contract. Confirm the producer release name in the Application manifest for your runtime. Some runtimes deploy a versioned release name such asasb-producer-v0. -
Add the Sync Hub pod labels to the connector’s
values.yamlfile so the runtime network policy allows the call to the producer: -
Build and run the connector locally:
Verify the connector
To confirm the connector receives webhooks and publishes events:-
Send a test request to the webhook endpoint locally, for example with
curl: - Check the connector logs for successful validation and publish.
- Check the producer logs in Grafana for the matching publish activity. For queries, see Logs.
- Confirm the message arrives on the topic with Azure Service Bus tooling. For more information, see Service Bus explorer.
- Register the endpoint URL with the vendor and send a vendor test notification where the vendor supports it.
Next steps
- Configure a custom connector: Store the vendor secret with SOPS and set environment-specific properties.
- Test and validate: Add automated tests for validation and publish behavior.
- Sync Hub go-live checklist: Verify your setup before production.