Issue Description
Invoking the client.history.getMessages() method fails with RtmUnavailableError even after successfully activating Signaling Storage within the management interface. This behavior occurs when the message history service infrastructure has not been fully provisioned for the specific Application Identifier.
Platform/SDK
- Product category: Signaling, RTM Message History
- SDK:
agora-rtm-2.2.4 - API:
client.history.getMessages() - Regional Constraints: Regional availability is restricted to the North America data center during the current Beta phase.
Error Characterization
The application client architecture returns the following generic exception block upon invocation:
RtmUnavailableError
History service is not available
code: -*****
Root Cause
Utilizing the Real Time Messaging Message History feature mandates a dual phase configuration: enabling Signaling Storage via the user interface and provisioning the History microservice on the backend cluster for the target Application Identifier.
Activating the storage toggle in the management interface initializes the storage bucket routing but is insufficient until the core backend enablement and retention period configurations are completed. Furthermore, during the ongoing Beta testing lifecycle, this history routing sub system is exclusively deployed within the North America data center environment.
Step-by-Step Solution
Verify Project Data Center Location
Access the project configuration panel and audit the assigned data center region located under the Signaling section within Basic Information.
Standardize Regional Deployment
If the existing project instance is assigned to a non-supported data center, instantiate a new project structure specifically choosing North America as the primary data center location.
Configure Console Level Signaling Storage
Navigate to the project configuration dashboard and enforce storage activation through the following administrative path:
Project > Edit Config > All Features > Signaling > Storage Configuration > StorageRequest Backend Infrastructure Provisioning
If the method,
client.history.getMessages(), continues to returnRtmUnavailableErrorafter console activation, submit a formal service request to activate history synchronization for the Application Identifier. Production environments typically apply a standard 7-day retention ruleset during this stage.Await Deployment Finalization
Maintain the current integration staging environment and do not attempt production validation until backend engineering confirms that the provisioning workflow has reached a completed state.
Reinitialize the Client Session
Execute a complete client reauthentication sequence. Force the application to disconnect and log in again to refresh the token permissions, then invoke the history query method,
client.history.getMessages(), to retest.Validate History Retrieval
Confirm that the method,
client.history.getMessages(), successfully returns the historical message payloads and verify that the service unavailable exception,History service is not available, is no longer triggered within the runtime environment.
Best Practice
Implementing Real Time Messaging Message History requires synchronized alignment between frontend console parameters and backend service provisioning. For deployment during the Beta phase, development teams must strictly utilize a North America project topology and coordinate with support engineering to finalize backend service attachment if the interface reports service unavailability post console configuration.