esppy.connectors.RabbitMQPublisher¶
-
class
esppy.connectors.
RabbitMQPublisher
(rmqhost=None, rmqport=None, rmquserid=None, rmqpassword=None, rmqexchange=None, rmqtopic=None, rmqtype=None, urlhostport=None, name=None, is_active=None, transactional=None, blocksize=None, dateformat=None, buspersistence=None, buspersistencequeue=None, ignorecsvparseerrors=None, protofile=None, protomsg=None, configfilesection=None, csvfielddelimiter=None, noautogenfield=None, ackwindow=None, acktimer=None, publishwithupsert=None, rmqpasswordencrypted=None, addcsvopcode=None, addcsvflags=None, rmqvhost=None, useclientmsgid=None, rmqssl=None, rmqsslcacert=None, rmqsslkey=None, rmqsslcert=None, maxevents=None)¶ Bases:
esppy.connectors.base.Connector
Publish 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.
- transactionalstring, optional
When rmqtype=CSV, sets the event block type to transactional. The default value is normal.
- blocksizeint, optional
When rmqtype=CSV, specifies the number of events to include in a published event block. The default value is 1.
- 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.
- buspersistencestring, optional
Controls both auto-delete and durable
- buspersistencequeuestring, optional
Specifies the queue name used by a persistent publisher
- ignorecsvparseerrorsboolean, optional
Specifies that when a field in an input CSV event cannot be parsed, the event is dropped, an error is logged, and publishing continues.
- 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.
- configfilesectionstring, optional
Specifies the name of the section in the connector config file to parse for configuration parameters. Specify the value as [configfilesection].
- csvfielddelimiterstring, optional
Specifies the character delimiter for field data in input CSV events. The default delimiter is the , character.
- noautogenfieldboolean, optional
Specifies that input events are missing the key field that is autogenerated by the source window.
- ackwindowint, optional
Specifies the time period (in seconds) to leave messages that are received from Rabbit MQ unacknowledged.
- acktimerint, optional
Specifies the time interval (in seconds) for how often to check whether to send acknowledgments that are triggered by the ackwindow parameter. Must be configured if ackwindow is configured.
- publishwithupsertboolean, optional
Builds events with opcode=Upsert instead of Insert
- rmqpasswordencryptedboolean, optional
Specifies that rmqpassword is encrypted
- addcsvopcodeboolean, optional
Prepends an opcode and comma to input CSV events. The opcode is Insert unless publishwithupsert is enabled.
- addcsvflagsstring, optional
Specifies the event type to insert into input CSV events (with a comma). Valid values are “normal” and “partialupdate”.
- rmqvhoststring, optional
Specifies the Rabbit MQ vhost. The default is “/”
- useclientmsgidstring, optional
If the Source window has been restored from a persist to disk, ignores received binary event blocks that contain a message ID less than the greatest message ID in the restored window.
- 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.
- maxeventsint, optional
Specifies the maximum number of events to publish.
- Returns
-
__init__
(self, rmqhost=None, rmqport=None, rmquserid=None, rmqpassword=None, rmqexchange=None, rmqtopic=None, rmqtype=None, urlhostport=None, name=None, is_active=None, transactional=None, blocksize=None, dateformat=None, buspersistence=None, buspersistencequeue=None, ignorecsvparseerrors=None, protofile=None, protomsg=None, configfilesection=None, csvfielddelimiter=None, noautogenfield=None, ackwindow=None, acktimer=None, publishwithupsert=None, rmqpasswordencrypted=None, addcsvopcode=None, addcsvflags=None, rmqvhost=None, useclientmsgid=None, rmqssl=None, rmqsslcacert=None, rmqsslkey=None, rmqsslcert=None, maxevents=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