class Nsq::Consumer

Defined in:

nsq/consumer.cr

Constructors

Instance Method Summary

Instance methods inherited from class Nsq::ClientBase

channel_depth(topic = nil, channel = nil) channel_depth, channel_empty(topic = nil, channel = nil) channel_empty, connected? connected?, connections connections, stats(topic = nil, channel = nil) stats, terminate terminate, topic topic, topic_delete(topic = nil, channel = nil) topic_delete, topic_msgcount(topic = nil) topic_msgcount

Instance methods inherited from module Nsq::AttributeLogger

debug(msg) debug, error(msg) error, fatal(msg) fatal, info(msg) info, warn(msg) warn

Class methods inherited from module Nsq::AttributeLogger

included(klass) included

Constructor Detail

def self.new(opts = new(Hash(Symbol, Array(String) | String | Int32 | Channel(Message | Symbol)))) #

[View source]

Instance Method Detail

def max_in_flight : Int32 #

[View source]
def pop : Message | Nil #

pop the next message off the queue


[View source]
def pop_without_blocking : Message #

By default, if the internal queue is empty, pop will block until a new message comes in.

Calling this method won't block. If there are no messages, it just returns nil.


[View source]
def size #

returns the number of messages we have locally in the queue


[View source]