Ever Platform
RoadmapIdeasDeveloper ToolsSDK
  • About Ever Platform
  • Sandbox endpoint
  • Quick Start
  • Use cases
    • Infrastructure Provider
      • Projects
    • Community-driven development
      • Roadmap
        • Discussions
      • Your ideas
      • DevNet Giver(Faucet)
    • Custom development
      • Our clients
  • Products
    • Evercloud
      • Networks Endpoints
      • Get Started
      • GraphQL API documentation
      • Testnet Faucets
      • About data proofs in Cloud
      • SLA
      • HTTP notifications
    • Dedicated Cloud/Node
    • Dapp Server (DS)
    • Simple Emulator (SE)
      • Endpoint
    • Network Emulator (NE)
    • Functionality comparison
  • Samples
    • GraphQL Samples
      • Send message
      • Network Config
      • Blocks
      • Accounts
      • Transactions
      • Messages
      • Block and Transaction Pagination: Best Practice
      • Multiple Message Processing and Monitoring
      • Subscribe for REMP receipts
  • Reference
    • GraphQL API
      • Quick Start
      • Samples
      • Networks
      • Explore Playground
      • Connect to GraphQL API
      • Schema
      • Blockchain API
      • Info API
      • Query Collections: Query Language
      • Subscribe Collections
      • Message Monitor API
      • Field Descriptions
    • Evercloud API Add-ons
      • Query cost
      • Blockchain Statistics
      • FT (Fungible Token) API
      • Price
      • Counterparties
      • Flex API
    • Changelog
      • Evercloud
      • Dapp Server (DS)
      • Simple Emulator (SE)
    • Breaking changes
      • Policy
      • Deprecation schedule
      • Migration guides
        • GraphQL API 1.0 migration
  • SDK and tools
    • everdev
    • Client Libraries
  • Guides
    • How to connect to GraphQL API
  • 😊Social
    • Feedback page
    • Telegram
    • Discord
Powered by GitBook
On this page
  • Result message payload example
  • Error payload

Was this helpful?

  1. Samples
  2. GraphQL Samples

Subscribe for REMP receipts

After sending an external inbound message you can subscribe for its processing statuses

PreviousMultiple Message Processing and MonitoringNextGraphQL API

Last updated 1 year ago

Was this helpful?

This feature may be good if you want to make your application more responsive and user-friendly by providing detailed information about message processing stages to the user.

Use subscription rempReceipts to receive message processing statuses.

Subscription returns an error message and closes if the first receipt is not received within 5 seconds, and if any subsequent receipt is not received within 60 seconds after the previous receipt.

You can subscribe for receipts directly from API or you can use ever-sdk process_message function to receive these statuses into the callback.

subscription{
  rempReceipts(messageId: "082a5c2ab5b68b0ef9b8ced4fa865933ab19603f5171ec1190f3f45943214de0"){
    messageId
    timestamp
    json
    kind
  }
}
wscat -c wss://mainnet.evercloud.dev/your-project-id/graphql -s graphql-ws
{"id":"1","type":"start","payload":{"variables":{},"extensions":{},"operationName":null,"query":"subscription{rempReceipts(messageId:\"082a5c2ab5b68b0ef9b8ced4fa865933ab19603f5171ec1190f3f45943214de0\"){messageId,timestamp,json,kind}}"}}

Result message payload example

{
  "data": {
    "rempReceipts": {
      "messageId": "082a5c2ab5b68b0ef9b8ced4fa865933ab19603f5171ec1190f3f45943214de0",
      "timestamp": 0,
      "json": "{\"message_id\":\"082a5c2ab5b68b0ef9b8ced4fa865933ab19603f5171ec1190f3f45943214de0\",\"timestamp\":0,\"source_id\":\"a0573b3f9ed4e78781250a8a6955e930ffbde24e35d50b85dd2cf50f1d6ef30e\",\"signature\":\"\",\"kind\":\"PutIntoQueue\"}",
      "kind": "Other"
    }
  }
}

Error payload

If no receipt was received within a timeout (5 seconds for the first receipt, and 60 seconds for next receipts), there will be a ws message with error type and this payload:

{
  "error": {
    "name": "Error",
    "message": "Timeout"
  }
}
See the sample.