View Source Extreme.SharedSubscription (extreme v1.1.0-rc1)

This module contains functions shared between Extreme.Subscription and Extreme.ReadingSubscription.

Summary

Functions

Calls subscriber with {:on_event, event}, expecting :ok as result in order to apply backpressure.

Executes fun function for decoding response and responds on that message.

Sends subscription request and waits for positive response. Returns {:ok, subscription_confirmation}.

Sends unsubscribe request and remembers who it should respond to when response is received. Response will arrive to subscription as push message.

Functions

Link to this function

on_event(subscriber, event, ack_timeout)

View Source

Calls subscriber with {:on_event, event}, expecting :ok as result in order to apply backpressure.

Link to this function

process_push(fun, state)

View Source

Executes fun function for decoding response and responds on that message.

Sends subscription request and waits for positive response. Returns {:ok, subscription_confirmation}.

Link to this function

unsubscribe(from, state)

View Source

Sends unsubscribe request and remembers who it should respond to when response is received. Response will arrive to subscription as push message.