Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SessionMQ ¶
type SessionMQ struct {
// contains filtered or unexported fields
}
func New ¶
New creates a new consumer state instance, and automatically attempts to connect to the server.
func (*SessionMQ) Push ¶
Push will push data onto the queue, and wait for a confirm. If no confirms are received until within the resendTimeout, it continuously re-sends messages until a confirm is received. This will block until the server sends a confirm. Errors are only returned if the push action itself fails, see UnsafePush.
func (*SessionMQ) Stream ¶
Stream will continuously put queue items on the channel. It is required to call delivery.Ack when it has been successfully processed, or delivery.Nack when it fails. Ignoring this will cause data to build up on the server.
func (*SessionMQ) UnsafePush ¶
UnsafePush will push to the queue without checking for confirmation. It returns an error if it fails to connect. No guarantees are provided for whether the server will recieve the message.