NSQ Message

class gnsq.Message(timestamp, attempts, id, body)[source]

A class representing a message received from nsqd.

enable_async()[source]

Enables asynchronous processing for this message.

Consumer will not automatically respond to the message upon return of handle_message().

finish()[source]

Respond to nsqd that you’ve processed this message successfully (or would like to silently discard it).

has_responded()[source]

Returns whether or not this message has been responded to.

is_async()[source]

Returns whether or not asynchronous processing has been enabled.

on_finish[source]

Emitted after finish().

The signal sender is the message instance.

on_requeue[source]

Emitted after requeue().

The signal sender is the message instance and sends the timeout and a backoff flag as arguments.

on_touch[source]

Emitted after touch().

The signal sender is the message instance.

requeue(time_ms=0, backoff=True)[source]

Respond to nsqd that you’ve failed to process this message successfully (and would like it to be requeued).

touch()[source]

Respond to nsqd that you need more time to process the message.