cfxdb.realmstore._publication

Classes

Publication

Persisted publication database object.

Publications

Persisted publications archive.

_Publication

Expand methods on the class code generated by flatc.

Module Contents

class Publication(from_fbs=None)[source]

Bases: object

Persisted publication database object.

ENC_ALGO_CRYPTOBOX = 1[source]
ENC_ALGO_MQTT = 2[source]
ENC_ALGO_NONE = 0[source]
ENC_ALGO_XBR = 3[source]
ENC_SER_CBOR = 3[source]
ENC_SER_FLATBUFFERS = 6[source]
ENC_SER_JSON = 1[source]
ENC_SER_MSGPACK = 2[source]
ENC_SER_NONE = 0[source]
ENC_SER_OPAQUE = 5[source]
ENC_SER_UBJSON = 4[source]
__slots__ = ('_from_fbs', '_timestamp', '_publication', '_publisher', '_topic', '_args', '_kwargs',...[source]
__str__()[source]
_acknowledge = None[source]
_args = None[source]
_eligible = None[source]
_eligible_authid = None[source]
_eligible_authrole = None[source]
_enc_algo = None[source]
_enc_key = None[source]
_enc_serializer = None[source]
_exclude = None[source]
_exclude_authid = None[source]
_exclude_authrole = None[source]
_exclude_me = None[source]
_from_fbs = None[source]
_kwargs = None[source]
_payload = None[source]
_publication = None[source]
_publisher = None[source]
_retain = None[source]
_timestamp = None[source]
_topic = None[source]
property acknowledge[source]

If True, the broker was asked to acknowledge the publication with a success or error response.

Returns:

acknowledge flag

Return type:

None or bool

property args[source]

Positional values for application-defined event payload.

Returns:

positional arguments (app payload) of the event (if any)

Return type:

None or list

build(builder)[source]
static cast(buf)[source]
property eligible[source]

List of WAMP session IDs eligible to receive this event.

Returns:

list of eligible session IDs

Return type:

list[int]

property eligible_authid[source]

List of WAMP authids eligible to receive this event.

Returns:

list of eligible authids

Return type:

list[str]

property eligible_authrole[source]

List of WAMP authroles eligible to receive this event.

Returns:

list of eligible authroles

Return type:

list[str]

property enc_algo[source]

When using payload transparency, the encoding algorithm that was used to encode the payload.

Returns:

payload encryption algorithm

Return type:

int

property enc_key[source]

When using payload transparency with an encryption algorithm, the payload encryption key.

Returns:

payload key

Return type:

None or bytes

property enc_serializer[source]

When using payload transparency, the payload object serializer that was used encoding the payload.

Returns:

payload serializer

Return type:

int

property exclude[source]

List of WAMP session IDs to exclude from receiving this event.

Returns:

list of excluded session IDs

Return type:

list[int]

property exclude_authid[source]

List of WAMP authids to exclude from receiving this event.

Returns:

list of excluded authids

Return type:

list[str]

property exclude_authrole[source]

List of WAMP authroles to exclude from receiving this event.

Returns:

list of excluded authroles

Return type:

list[str]

property exclude_me[source]

If True, the broker was asked to exclude the publisher from receiving the event.

Returns:

exclude_me flag

Return type:

None or bool

property kwargs[source]

Keyword values for application-defined event payload.

Returns:

keyword arguments (app payload) of the event (if any)

Return type:

None or dict

marshal()[source]
property payload[source]

Alternative, transparent payload. If given, args and kwargs must be left unset.

Returns:

Transparent binary payload (see enc_algo) if applicable

Return type:

None or bytes

property publication[source]

WAMP publication ID that was assigned by the broker.

Returns:

publication ID

Return type:

int

property publisher[source]

WAMP session ID of the publisher.

Returns:

publisher ID

Return type:

int

property retain[source]

If True, the broker was requested to retain this event.

Returns:

retain flag

Return type:

None or bool

property timestamp[source]

Timestamp when the publication was accepted by the broker. Epoch time in ns.

Returns:

epoch time in ns

Return type:

int

property topic[source]

The WAMP or application URI of the PubSub topic the event was published to.

Returns:

topic (URI) published to

Return type:

str

class Publications(slot=None, compress=None, build=None, cast=None)[source]

Bases: zlmdb.MapOidFlatBuffers

Persisted publications archive.

Map zlmdb.MapOidFlatBuffers from publication to cfxdb.eventstore.Publication.

class _Publication[source]

Bases: cfxdb.gen.realmstore.Publication.Publication

Expand methods on the class code generated by flatc.

FIXME: comes up with a PR for flatc to generated this stuff automatically.

ArgsAsBytes()[source]
EncKeyAsBytes()[source]
classmethod GetRootAsPublication(buf, offset)[source]

This method is deprecated. Please switch to GetRootAs.

KwargsAsBytes()[source]
PayloadAsBytes()[source]