EnglishFrenchSpanish

OnWorks favicon

queue_mover3 - Online in the Cloud

Run queue_mover3 in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command queue_mover3 that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


queue_mover3 - PgQ consumer that copies data from one queue to another.

SYNOPSIS


queue_mover3 [switches] config.ini

DESCRIPTION


queue_mover is PgQ consumer that transports events from source queue into target queue.
One use case is when events are produced in several databases then queue_mover is used to
consolidate these events into single queue that can then be processed by consumers who
need to handle theses events. For example in case of patitioned databases it’s convenient
to move events from each partition into one central queue database and then process them
there. That way configuration and dependancies of partiton databases are simpler and more
robust. Another use case is to move events from OLTP database to batch processing server.

Transactionality: events will be inserted as one transaction on target side. That means
only batch_id needs to be tracked on target side.

QUICK-START


Basic PgQ setup and usage can be summarized by the following steps:

1. PgQ must be installed both in source and target databases. See pgqadm man page for
details.

2. Target database must also have pgq_ext schema installed. It is used to keep sync
between two databases.

3. Create a queue_mover configuration file, say qmover_sourceq_to_targetdb.ini

4. create source and target queues

$ pgqadm.py sourcedb_ticker.ini create <srcqueue>
$ pgqadm.py targetdb_ticker.ini create <dstqueue>

5. launch queue mover in daemon mode

$ queue_mover3 -d qmover_sourceq_to_targetdb.ini

6. start producing and consuming events

CONFIG


Common configuration parameters
job_name
Name for particulat job the script does. Script will log under this name to
logdb/logserver. The name is also used as default for PgQ consumer name. It should be
unique.

pidfile
Location for pid file. If not given, script is disallowed to daemonize.

logfile
Location for log file.

loop_delay
If continuisly running process, how long to sleep after each work loop, in seconds.
Default: 1.

connection_lifetime
Close and reconnect older database connections.

use_skylog
foo.

Common PgQ consumer parameters
queue_name
Queue name to attach to. No default.

consumer_name
Consumers ID to use when registering. Default: %(job_name)s

queue_mover parameters
src_db
Source database.

dst_db
Target database.

dst_queue_name
Target queue name.

Example config file
[queue_mover3]
job_name = eventlog_to_target_mover
src_db = dbname=sourcedb
dst_db = dbname=targetdb
pgq_queue_name = eventlog
dst_queue_name = copy_of_eventlog
pidfile = log/%(job_name)s.pid
logfile = pid/%(job_name)s.log

COMMAND LINE SWITCHES


Following switches are common to all skytools.DBScript-based Python programs.

-h, --help
show help message and exit

-q, --quiet
make program silent

-v, --verbose
make program more verbose

-d, --daemon
make program go background

--ini
show commented template config file.

Following switches are used to control already running process. The pidfile is read from
config then signal is sent to process id specified there.

-r, --reload
reload config (send SIGHUP)

-s, --stop
stop program safely (send SIGINT)

-k, --kill
kill program immidiately (send SIGTERM)

Use queue_mover3 online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    unitedrpms
    unitedrpms
    Join us in Gitter!
    https://gitter.im/unitedrpms-people/Lobby
    Enable the URPMS repository in your
    system -
    https://github.com/UnitedRPMs/unitedrpms.github.io/bl...
    Download unitedrpms
  • 2
    Boost C++ Libraries
    Boost C++ Libraries
    Boost provides free portable
    peer-reviewed C++ libraries. The
    emphasis is on portable libraries which
    work well with the C++ Standard Library.
    See http://www.bo...
    Download Boost C++ Libraries
  • 3
    VirtualGL
    VirtualGL
    VirtualGL redirects 3D commands from a
    Unix/Linux OpenGL application onto a
    server-side GPU and converts the
    rendered 3D images into a video stream
    with which ...
    Download VirtualGL
  • 4
    libusb
    libusb
    Library to enable user space
    application programs to communicate with
    USB devices. Audience: Developers, End
    Users/Desktop. Programming Language: C.
    Categories...
    Download libusb
  • 5
    SWIG
    SWIG
    SWIG is a software development tool
    that connects programs written in C and
    C++ with a variety of high-level
    programming languages. SWIG is used with
    different...
    Download SWIG
  • 6
    WooCommerce Nextjs React Theme
    WooCommerce Nextjs React Theme
    React WooCommerce theme, built with
    Next JS, Webpack, Babel, Node, and
    Express, using GraphQL and Apollo
    Client. WooCommerce Store in React(
    contains: Products...
    Download WooCommerce Nextjs React Theme
  • More »

Linux commands

Ad