• Subscribes to messages for a topic

    Returns

    A Promise containing the unique subscription reference. This will need to be stored for calling unsubscribe.

    Parameters

    • topic: string

      The topic to subscribe to

    • onMessageReceived: ((message: Message) => void)

      The callback to invoke when a message is received

    Returns EmitterSubscription

Generated using TypeDoc