flux.message module

class flux.message.Message(type_id=flux.constants.FLUX_MSGTYPE_REQUEST, handle=None)

Bases: WrapperPimpl

Flux message wrapper class.

class InnerWrapper(type_id=flux.constants.FLUX_MSGTYPE_REQUEST, handle=None)

Bases: Wrapper

decode()

Decode a message

Attempt to decode a message and return the message type, topic, and payload string if successful.

Returns

FLUX_MSGTYPE_REQUEST or FLUX_MSGTYPE_RESPONSE topic: topic string payload: payload string if one exists

Return type

type

Raises

OSError -- if message is an error response, raises OSError with exception.errno set

classmethod from_event_encode(topic, payload=None)
property payload
property payload_str
property topic
property type
property type_str
class flux.message.MessageWatcher(flux_handle, type_mask, callback, topic_glob='*', match_tag=flux.constants.FLUX_MATCHTAG_NONE, rolemask=None, args=None)

Bases: Watcher

destroy()
start()
stop()
flux.message.msg_typestr(msg_type)