Closed gnarea closed 1 year ago
Route looks like this roughly:
const channel = await fastify.activeEndpoint.getChannel(event.subject);
const parcelSerialsied = await channel.makeMessage(
new ServiceMessage(event.datacontenttype, event.data),
Parcel,
{
creationDate: event.time,
// ...
},
)
await deliverParcel(channel.peer.internetAddress, parcelSerialsied, useTls);
Refer to https://github.com/relaycorp/awala-endpoint-internet#outgoing-service-message
:tada: This issue has been resolved in version 1.4.0 :tada:
The release is available on:
v1.4.0
Your semantic-release bot :package::rocket:
POST /
in the PoHTTP client. We should use the binary mode of CloudEvents.This basically processes
outgoing-service-message
events (refer to the README for the spec). For every event, it should do the following:WARN
message and return a503 Service Unavailable
.WARN
message and return a503 Service Unavailable
.PoHTTPInvalidParcelError
orPoHTTPClientBindingError
is thrown: Log anINFO
message and return a204 No Content
.INFO
log and return a502 Bad Gateway
.Note on 5XX responses
They would cause a broker like Google PubSub to retry later.