esppy.connectors.RabbitMQSubscriber¶
-
class
esppy.connectors.
RabbitMQSubscriber
(rmqhost=None, rmqport=None, rmquserid=None, rmqpassword=None, rmqexchange=None, rmqtopic=None, rmqtype=None, urlhostport=None, numbufferedmsgs=None, snapshot=None, name=None, is_active=None, collapse=None, rmretdel=None, hotfailover=None, dateformat=None, buspersistence=None, protofile=None, protomsg=None, csvincludeschema=None, useclientmsgid=None, configfilesection=None, rmqpasswordencrypted=None, rmqvhost=None, csvmsgperevent=None, csvmsgpereventblock=None, rmqcontenttype=None, rmqheaders=None, rmqssl=None, rmqsslcacert=None, rmqsslkey=None, rmqsslcert=None)¶ Bases:
esppy.connectors.base.Connector
Subscribe to Rabbit MQ events
- Parameters
- rmqhoststring
Specifies the Rabbit MQ server host name
- mqportstring
Specifies the Rabbit MQ server port
- rmquseridstring
Specifies the user name required to authenticate the connector’s session with the Rabbit MQ server.
- rmqpasswordstring
Specifies the password associated with rmquserid
- rmqexchangestring
Specifies the Rabbit MQ exchange created by the connector, if nonexistent.
- rmqtopicstring
Specifies the Rabbit MQ routing key to which messages are published.
- rmqtypestring
Specifies binary, CSV, JSON, or the name of a string field in the subscribed window schema.
- urlhostportstring
Specifies the host:port field in the metadata topic subscribed to on start-up to field metadata requests.
- numbufferedmsgsint
Specifies the maximum number of messages buffered by a standby subscriber connector.
- snapshotboolean, optional
Specifies whether to send snapshot data
- collapsestring, optional
Enables conversion of UPDATE_BLOCK events to make subscriber output publishable. The default value is disabled.
- rmretdelboolean, optional
Specifies to remove all delete events from event blocks received by a subscriber that were introduced by a window retention policy.
- hotfailoverboolean, optional
Enables hot failover mode
- dateformatstring, optional
Specifies the format of ESP_DATETIME and ESP_TIMESTAMP fields in CSV events. The default behavior is these fields are interpreted as an integer number of seconds (ESP_DATETIME) or microseconds (ESP_TIMESTAMP) since epoch.
- buspersistenceboolean, optional
Specify to send messages using persistent delivery mode
- protofilestring, optional
Specifies the .proto file that contains the Google Protocol Buffers message definition used to convert event blocks to protobuf messages. When you specify this parameter, you must also specify the protomsg parameter.
- protomsgstring, optional
Specifies the name of a Google Protocol Buffers message in the .proto file that you specified with the protofile parameter. Event blocks are converted into this message.
- csvincludeschemastring, optional
When rmqtype=CSV, specifies when to prepend output CSV data with the window’s serialized schema. Valid values are never, once, and pereventblock. The default value is never.
- useclientmsgidboolean, optional
When performing a failover operation and extracting a message ID from an event block, use the client-generated message ID instead of the engine-generated message ID.
- configfilesectionstring, optional
Specifies the name of the section in the connector config file to parse for configuration parameters. Specify the value as [configfilesection].
- rmqpasswordencryptedboolean, optional
Specifies that rmqpassword is encrypted
- rmqvhoststring, optional
Specifies the Rabbit MQ vhost. The default is “/”.
- csvmsgpereventint, optional
For CSV, specifies to send one message per event. The default is one message per transactional event block or else one message per event.
- csvmsgpereventblockint, optional
For CSV, specifies to send one message per event block. The default is one message per transactional event block or else one message per event.
- rmqcontenttypestring, optional
Specifies the value of the content_type parameter in messages sent to RabbitMQ.
- rmqheadersstring, optional
A comma separated list of key value optional headers in messages sent to RabbitMQ. The default value is no headers.
- rmqsslboolean, optional
Specifies to enable SSL encryption on the connection to the Rabbit MQ server.
- rmqsslcacertstring, optional
When rmqssl is enabled, specifies the full path of the SSL CA certificate .pem file.
- rmqsslkeystring, optional
When rmqssl is enabled, specifies the full path of the SSL key .pem file.
- rmqsslcert string, optional
When rmqssl is enabled, specifies the full path of the SSL certificate .pem file.
- Returns
-
__init__
(self, rmqhost=None, rmqport=None, rmquserid=None, rmqpassword=None, rmqexchange=None, rmqtopic=None, rmqtype=None, urlhostport=None, numbufferedmsgs=None, snapshot=None, name=None, is_active=None, collapse=None, rmretdel=None, hotfailover=None, dateformat=None, buspersistence=None, protofile=None, protomsg=None, csvincludeschema=None, useclientmsgid=None, configfilesection=None, rmqpasswordencrypted=None, rmqvhost=None, csvmsgperevent=None, csvmsgpereventblock=None, rmqcontenttype=None, rmqheaders=None, rmqssl=None, rmqsslcacert=None, rmqsslkey=None, rmqsslcert=None)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(self[, rmqhost, rmqport, …])Initialize self.
clear
(self)copy
(self[, deep])Return a copy of the object
from_element
(data[, session])Construct connector from XML definition
from_parameters
(conncls[, type, name, …])from_xml
(data[, session])Construct connector from XML definition
get
(self, key[, default])items
(self)keys
(self)pop
(self, key[, default])If key is not found, d is returned if given, otherwise KeyError is raised.
popitem
(self)as a 2-tuple; but raise KeyError if D is empty.
set_properties
(self, \*\*kwargs)Set connector properties
setdefault
(self, key[, default])to_element
(self)Export connector definition to ElementTree.Element
to_xml
(self[, pretty])Export connector definition to XML
update
(\*args, \*\*kwds)If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v
values
(self)Attributes
connector_key
property_defs