RabbitMQ / AMQP

Source

class AMQPSource(app, pipeline, connection, id=None, config=None)[source]

Bases: Source

Description:

AMQPSource.__init__()[source]

Set the initial ID, Pipeline and Task.

Parameters

appApplication

Name of an Application <https://asab.readthedocs.io/en/latest/asab/application.html#>`_ .

pipelineaddress of a pipeline

Name of a Pipeline.

idstr, default None

Name of a the Pipeline.

configcompatible config type , default None

Option for adding a configuration file.

async AMQPSource.main()[source]

Description:

async AMQPSource.process_message(method, properties, body)[source]

Description:

classmethod AMQPSource.construct(app, pipeline, definition: dict)[source]

Description:

AMQP Full Message Source

class AMQPFullMessageSource(app, pipeline, connection, id=None, config=None)[source]

Bases: AMQPSource

Description:

AMQPFullMessageSource.process_message(method, properties, body)[source]

Description:

Sink

class AMQPSink(app, pipeline, connection, id=None, config=None)[source]

Bases: Sink

AMQPSink.__init__()[source]

Initializes the Parameters

Parameters

appobject

Application object.

pipelinePipeline

Name of the Pipeline.

idstr, default=None,

ID of the class of config.

configJSON, or other compatible formats, default=None

Configuration file.

AMQPSink.process(context, event)[source]

Can be implemented to return event based on a given logic.

Parameters

context :

Additional information passed to the method.

eventData with time stamp stored in any data type, usually it is in JSON.

You can specify an event that is passed to the method.

Connection

class AMQPConnection(app, id=None, config=None)[source]

Bases: Connection

AMQPConnection.__init__()[source]

Description:

Parameters

appApplication

Specification of an Application.

id : default None

configJSON or other compatible format, default None

It contains important information and data responsible for creating a connection.