def start(): publisher = InfluxDBPublisher( database=influx_database, host='localhost') # Default conn parameters from __main__, with username and # password specified conn_parameters = { 'host': 'localhost', 'port': 5672, 'connection_attempts': 12, 'retry_delay': 5, 'credentials': { 'username': '******', 'password': '******', }, 'ssl': False, 'ca_path': '', } consumer = AMQPTopicConsumer( exchange=amqp_exchange, routing_key=routing_key, message_processor=publisher.process, connection_parameters=conn_parameters) consumer.consume()
def main(): args = parse_args() publisher = InfluxDBPublisher(database=args.influx_database, host=args.influx_hostname, batch_size=args.influx_batch_size, max_batch_delay=args.influx_max_batch_delay) # This arg is a string for ease of use with the manager blueprint if args.amqp_ssl_enabled.lower() == 'true': ssl_enabled = True amqp_port = BROKER_PORT_SSL else: ssl_enabled = False amqp_port = BROKER_PORT_NO_SSL conn_params = { 'host': args.amqp_hostname, 'port': amqp_port, 'connection_attempts': 12, 'retry_delay': 5, 'credentials': { 'username': args.amqp_username, 'password': args.amqp_password, }, 'ca_path': args.amqp_ca_cert_path, 'ssl': ssl_enabled, } consumer = AMQPTopicConsumer(exchange=args.amqp_exchange, routing_key=args.amqp_routing_key, message_processor=publisher.process, connection_parameters=conn_params) consumer.consume()
def main(): args = parse_args() publisher = InfluxDBPublisher( database=args.influx_database, host=args.influx_hostname, batch_size=args.influx_batch_size, max_batch_delay=args.influx_max_batch_delay) # This arg is a string for ease of use with the manager blueprint if args.amqp_ssl_enabled.lower() == 'true': ssl_enabled = True amqp_port = BROKER_PORT_SSL else: ssl_enabled = False amqp_port = BROKER_PORT_NO_SSL conn_params = { 'host': args.amqp_hostname, 'port': amqp_port, 'connection_attempts': 12, 'retry_delay': 5, 'credentials': { 'username': args.amqp_username, 'password': args.amqp_password, }, 'ca_path': args.amqp_ca_cert_path, 'ssl': ssl_enabled, } consumer = AMQPTopicConsumer( exchange=args.amqp_exchange, routing_key=args.amqp_routing_key, message_processor=publisher.process, connection_parameters=conn_params) consumer.consume()
def start(): publisher = InfluxDBPublisher( database=influx_database, host='localhost') consumer = AMQPTopicConsumer( exchange=amqp_exchange, routing_key=routing_key, message_processor=publisher.process) consumer.consume()
def main(): args = parse_args() publisher = InfluxDBPublisher( database=args.influx_database) consumer = AMQPTopicConsumer( exchange=args.amqp_exchange, routing_key=args.amqp_routing_key, message_processor=publisher.process) consumer.consume()
def main(): args = parse_args() publisher = InfluxDBPublisher( database=args.influx_database, host=args.influx_hostname, batch_size=args.influx_batch_size, max_batch_delay=args.influx_max_batch_delay) conn_params = { 'host': args.amqp_hostname, 'connection_attempts': 12, 'retry_delay': 5 } consumer = AMQPTopicConsumer( exchange=args.amqp_exchange, routing_key=args.amqp_routing_key, message_processor=publisher.process, connection_parameters=conn_params) consumer.consume()
def start(): publisher = InfluxDBPublisher(database=influx_database, host='localhost') # Default conn parameters from __main__, with username and # password specified conn_parameters = { 'host': 'localhost', 'port': 5672, 'connection_attempts': 12, 'retry_delay': 5, 'credentials': { 'username': '******', 'password': '******', }, 'ssl': False, 'ca_path': '', } consumer = AMQPTopicConsumer(exchange=amqp_exchange, routing_key=routing_key, message_processor=publisher.process, connection_parameters=conn_parameters) consumer.consume()