Build one MessagingBackend that spans every enabled provider.
Conversation and message ids leaving the composite are namespaced as
"<providerId>:<innerId>"; ids arriving from callers are split on the first
: to find the provider. Pagination cursors for conversations() are
namespaced the same way and are only produced when exactly one provider is
involved; with several providers the merged page carries no cursor, because
no single provider can resume it.
close() is a no-op: the registry that enabled the backends owns their
lifetime and closes them through MessagingRegistry.close(). Unsubscribing
a composite subscription skips providers that were disabled in the meantime,
since disabling already closed their backend.
Build one
MessagingBackendthat spans every enabled provider.Conversation and message ids leaving the composite are namespaced as
"<providerId>:<innerId>"; ids arriving from callers are split on the first:to find the provider. Pagination cursors forconversations()are namespaced the same way and are only produced when exactly one provider is involved; with several providers the merged page carries no cursor, because no single provider can resume it.close()is a no-op: the registry that enabled the backends owns their lifetime and closes them throughMessagingRegistry.close(). Unsubscribing a composite subscription skips providers that were disabled in the meantime, since disabling already closed their backend.