rabbit_force package¶
Main package of the rabbit_force application
Subpackages¶
Submodules¶
rabbit_force.amqp_broker module¶
rabbit_force.app module¶
rabbit_force.config module¶
rabbit_force.exceptions module¶
Exception types
Exception hierarchy:
RabbitForceError
InvalidOperation
SpecificationError
NetworkError
ServerError
SalesforceRestError
SalesforceMultipleChoicesError
SalesforceNotModifiedError
SalesforceBadRequestError
SalesforceUnauthorizedError
SalesforceForbiddenError
SalesforceNotFoundError
SalesforceMethodNotAllowedError
SalesforceUnsupportedMediaTypeError
SalesforceInternalServerError
MessageSourceError
InvalidRoutingConditionError
MessageSinkError
ConfigurationError
ReplayStorageError
-
exception
rabbit_force.exceptions.ConfigurationError¶ Bases:
rabbit_force.exceptions.RabbitForceErrorApplication configuration error
-
exception
rabbit_force.exceptions.InvalidOperation¶ Bases:
rabbit_force.exceptions.RabbitForceErrorAn invalid operation
-
exception
rabbit_force.exceptions.InvalidRoutingConditionError¶ Bases:
rabbit_force.exceptions.RabbitForceErrorFailed to parse routing condition
-
exception
rabbit_force.exceptions.MessageSinkError¶ Bases:
rabbit_force.exceptions.RabbitForceErrorMessage sink related error
-
exception
rabbit_force.exceptions.MessageSourceError¶ Bases:
rabbit_force.exceptions.RabbitForceErrorMessage source related error
-
exception
rabbit_force.exceptions.NetworkError¶ Bases:
rabbit_force.exceptions.RabbitForceErrorNetwork related error
-
exception
rabbit_force.exceptions.RabbitForceError¶ Bases:
ExceptionBase exception type.
All exceptions of the package inherit from this class.
-
exception
rabbit_force.exceptions.ReplayStorageError¶ Bases:
rabbit_force.exceptions.RabbitForceErrorReplay storage error
-
exception
rabbit_force.exceptions.SalesforceBadRequestError¶ Bases:
rabbit_force.exceptions.SalesforceRestErrorThe request couldn’t be understood
-
exception
rabbit_force.exceptions.SalesforceForbiddenError¶ Bases:
rabbit_force.exceptions.SalesforceRestErrorThe request has been refused
-
exception
rabbit_force.exceptions.SalesforceInternalServerError¶ Bases:
rabbit_force.exceptions.SalesforceRestErrorAn error has occurred within Lightning Platform, so the request couldn’t be completed
-
exception
rabbit_force.exceptions.SalesforceMethodNotAllowedError¶ Bases:
rabbit_force.exceptions.SalesforceRestErrorThe method specified in the Request-Line isn’t allowed for the resource specified in the URI
-
exception
rabbit_force.exceptions.SalesforceMultipleChoicesError¶ Bases:
rabbit_force.exceptions.SalesforceRestErrorWhen an external ID exists in more than one record
-
exception
rabbit_force.exceptions.SalesforceNotFoundError¶ Bases:
rabbit_force.exceptions.SalesforceRestErrorThe requested resource couldn’t be found
-
exception
rabbit_force.exceptions.SalesforceNotModifiedError¶ Bases:
rabbit_force.exceptions.SalesforceRestErrorThe request content has not changed since a specified date and time
-
exception
rabbit_force.exceptions.SalesforceRestError¶ Bases:
rabbit_force.exceptions.ServerErrorSalesforce REST API error
Bases:
rabbit_force.exceptions.SalesforceRestErrorThe _session ID or OAuth token used has expired or is invalid
-
exception
rabbit_force.exceptions.SalesforceUnsupportedMediaTypeError¶ Bases:
rabbit_force.exceptions.SalesforceRestErrorThe entity in the request is in a format that’s not supported by the specified method
-
exception
rabbit_force.exceptions.ServerError¶ Bases:
rabbit_force.exceptions.RabbitForceErrorServer side error
-
exception
rabbit_force.exceptions.SpecificationError¶ Bases:
rabbit_force.exceptions.RabbitForceErrorInvalid value or type in the config specification
rabbit_force.factories module¶
rabbit_force.message_sink module¶
Definition of MessageSink classes and their collaborator classes
-
class
rabbit_force.message_sink.AmqpBrokerMessageSink(broker, json_dumps=<function dumps>)¶ Bases:
rabbit_force.message_sink.MessageSinkMessage sink for publishing the consumed messages with AMQP
- Parameters
broker (AmqpBroker) – An amqp message broker object
json_dumps (
callable()) – Function for JSON serialization, the default isjson.dumps()
- Raises
NetworkError – If a network related error occurs
-
CONTENT_TYPE= 'application/json'¶
-
ENCODING= 'utf-8'¶
-
close()¶ Close the message sink
-
consume_message(message, sink_name, exchange_name, routing_key, properties=None)¶ Forward the message with the sink specified with sink_name
- Parameters
message (dict) – An outgoing message
sink_name (str) – The name of the sink that should consume the message
exchange_name (str) – The name of the exchange which should receive the message
routing_key (str) – The message’s routing key parameter
properties (dict) – Additional message properties. Every additional property will be forwarded by the sink except for
content_typeandcontent_encodingwhich will be overwritten
-
class
rabbit_force.message_sink.MessageSink¶ Bases:
abc.ABCAbstract message sink base class
A message sink’s responsibility is to consume outgoing messages
-
close()¶ Close the message sink
-
consume_message(message, sink_name, exchange_name, routing_key, properties=None)¶ Forward the message with the sink specified with sink_name
- Parameters
message (dict) – An outgoing message
sink_name (str) – The name of the sink that should consume the message
exchange_name (str) – The name of the exchange which should receive the message
routing_key (str) – The message’s routing key parameter
properties (dict) – Additional message properties. Every additional property will be forwarded by the sink except for
content_typeandcontent_encodingwhich will be overwritten
-
-
class
rabbit_force.message_sink.MultiMessageSink(sinks, loop=None)¶ Bases:
rabbit_force.message_sink.MessageSinkMessage sink to route consumed messages between multiple message sinks
- Parameters
sources (list[MessageSource]) – A list of message sources
loop – Event
loopused to schedule tasks. If loop isNonethenasyncio.get_event_loop()is used to get the default event loop.
-
close()¶ Close the message sink
-
consume_message(message, sink_name, exchange_name, routing_key, properties=None)¶ Forward the message with the sink specified with sink_name
- Parameters
message (dict) – An outgoing message
sink_name (str) – The name of the sink that should consume the message
exchange_name (str) – The name of the exchange which should receive the message
routing_key (str) – The message’s routing key parameter
properties (dict) – Additional message properties. Every additional property will be forwarded by the sink except for
content_typeandcontent_encodingwhich will be overwritten
-
sinks= None¶ Message sink list