Skip to main content
Version: v2.0.0

WeChat Official Account connector

Audience: operators bridging EventMesh with WeChat Official Account. WeChat Official Account bridge. Source handles the platform's server-to-server callback — the GET echostr verification (SHA-1 of token/timestamp/nonce) and POST XML message pushes; sink posts events to a webhook.


Classes

DirectionClassBehavior
Sourceorg.apache.eventmesh.connector.wechat.source.WechatSourceConnectorJDK HttpServer on connector.port+connector.path; GET answers the server verification (echostr when sha1(sort(token,timestamp,nonce)) matches); POST parses the XML message (FromUserName/MsgType/MsgId) into a CloudEvent and replies success.
Sinkorg.apache.eventmesh.connector.wechat.sink.WechatSinkConnectorPOSTs each CloudEvent's payload to connector.webhookUrl.

Source configuration

KeyDefaultDescription
connector.port8094HTTP listen port
connector.path/wechatHTTP listen path
connector.tokeneventmeshServer-verification token configured in the WeChat admin console

Sink configuration

KeyDefaultDescription
connector.webhookUrl``Webhook to POST events into

Running

Set the account's server URL to http://worker:8094/wechat with the matching token; bin/start-connector.sh with -Dconnector.class=...WechatSourceConnector -Dconnector.mode=source