Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPC endpoint for associating a function call's return value with a message queue #5

Closed
tpmccallum opened this issue May 3, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@tpmccallum
Copy link
Contributor

The RPC caller provides Azure credentials in the HTTP request.

This operation will redirect the function's return value to a message queue. We should support

  • Azure Queue Storage
  • Azure Events Hub
  • AWS SNS
  • AWS SQS
  • Twilio
@tpmccallum tpmccallum added the enhancement New feature or request label May 3, 2020
@tpmccallum
Copy link
Contributor Author

Caller can now set a full callback object for the wasm executable. This callback object can contain all of the request information which will allow the function's return value to be redirected to the details provided in the callback.
https://github.com/second-state/wasm-joey/blob/master/src/server.js#L1779

Here is an example of how a caller would create a POST request (the callback object) for an AWS SQS request.
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-making-api-requests.html#structure-post-request

If a caller would prefer not to set the callback permanently, but rather per HTTP request, they can add the AWS SQS request in the header of their call. Joey will detect this and execute the callback request using the function's return value as the body/data. This option may be preferred when sending authentication for the AWS SQS request.
https://github.com/second-state/wasm-joey/blob/master/src/server.js#L1457

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant