summaryrefslogtreecommitdiff
path: root/libeufin/nexus-manual.rst
diff options
context:
space:
mode:
Diffstat (limited to 'libeufin/nexus-manual.rst')
-rw-r--r--libeufin/nexus-manual.rst73
1 files changed, 48 insertions, 25 deletions
diff --git a/libeufin/nexus-manual.rst b/libeufin/nexus-manual.rst
index a434e1dc..447637d3 100644
--- a/libeufin/nexus-manual.rst
+++ b/libeufin/nexus-manual.rst
@@ -108,10 +108,10 @@ Sending payments
Sending payments must follow a successful `EBICS subscriber setup <ebics-setup>`_,
where the bank obtained the subscriber keys, and the subscriber accepted the
-bank keys. The responsible subcommand is ``ebics-submit``, and its
-configuration is a **superset** of core-config_. On top of that, it
-expects the database connection string, and *optionally* a frequency to
-check for submittable payments in the database.
+bank keys. The responsible subcommand for sending payments is ``ebics-submit``,
+and its configuration is a **superset** of core-config_. On top of that, it
+expects the database connection string, and *optionally* a frequency to check
+for submittable payments in the database.
The connection string is specified as
@@ -145,7 +145,7 @@ For testing
-----------
The ``ebics-submit`` subcommand is **not** suitable to send arbitrary
-payments, but rather to *submit* initiated payments that may be found
+payments, but rather to submit initiated payments that may be found
in the database.
Such initiated payments may be refunds of incoming payments with a subject
@@ -183,18 +183,7 @@ the database, submit what is submittable, and return.
For production
--------------
-The ``ebics-submit`` subcommand can run in long-polling, fixed frequency, or
-transient mode.
-
-The long-polling mode causes the command to never return and to submit the payments
-to the bank *as soon as they arrive in the database*. To activate this mode, set
-the frequency to ``0s`` in the configuration. Assuming that ``$config_long_polling``
-is set as described above, the following invocation would make ``ebics-submit`` run
-in long-polling mode:
-
-.. code-block:: console
-
- libeufin-nexus ebics-submit -c $config_file
+The ``ebics-submit`` subcommand can run in fixed frequency, or transient mode.
The fixed frequency mode causes the command to check the database every time the
frequency period expires. To activate this mode, and -- for example -- set a frequency
@@ -203,21 +192,55 @@ of five minutes, set the configuration value ``FREQUENCY`` to ``5m``. Assuming
make ``ebics-submit`` check the database every five minutes, and submit any initiated
payment according to their submission state.
-.. note::
-
- long-polling is still unsupported and resubmission of payments with a
- ``transient_failure`` after a long-polled trigger is under discussion.
-
.. code-block:: console
libeufin-nexus ebics-submit -c $config_fixed_frequency
-Finally, transient mode causes ``ebics-submit`` to check the database only once,
-submit any initiated payment according to their submission state, and soon return.
+Transient mode causes ``ebics-submit`` to check the database only once, submit any
+initiated payment according to their submission state, and return.
.. code-block:: console
libeufin-nexus ebics-submit -c $config
-There's no need to set the frequency in the configuration.
+Downloading records
+===================
+
+Downloading records must follow a successful `EBICS subscriber setup <ebics-setup>`_,
+where the bank obtained the subscriber keys, and the subscriber accepted the bank keys.
+
+The following configuration sets the (mandatory) database connection and a log directory
+where any downloaded record would be stored.
+
+.. code-block:: console
+
+ [nexus-postgres]
+ config = postgres:///nexus
+ [nexus-fetch]
+ statement_log_directory = $LIBEUFIN_DATA_HOME/camt
+
+Assuming that ``$config_file`` contains any required option, the following command
+would download any unseen notifications (as camt.054 files).
+
+.. code-block:: console
+
+ libeufin-nexus ebics-fetch -c $config_file --transient
+
+The ``--transient`` flag makes the command to download only once and return. If the
+bank returned any records, look in ``$LIBEUFIN_DATA_HOME/cat/YYYY-MM-DD`` to find them.
+YYYY-MM-DD is the date when the download took place.
+
+To activate periodic downloads, add the following setting to the ``nexus-fetch``
+configuration section in ``$config_file``:
+
+.. code-block:: console
+
+ frequency = 5m
+
+The following invocation would then download records every five minutes, asking the bank
+to only return documents that are timestamped *from* (inclusive) the last incoming transaction.
+
+.. code-block:: console
+
+ libeufin-nexus ebics-fetch -c $config_file