Replication

The purpose of this tutorial is to help you configure two iDempiere instances to communicate via replication. One instance will act as a 'data source' and the second instance will act as a 'data target'.

Replication Introduction

Replication Scenarios

Replication Scenario - 3rd

Replication Options

Replication - ActiveMQ Concepts

Queues vs. Topics Durable vs Non-Durable Can you view Topics - No… Yes… It Depends….

ActiveMQ Installation

Link to Installation Script

Replication - Bug Fixes

Created Patch for community Second Patch to fix Export SQL Exception

Replication - Source Configuration

Tangent - Create a Test Window to Replicate

Replication - Source Configuration - Demonstration

Review below notes before watching this video. Execute the below SQL delete statements before watching this video.
Important Notes: SQL to delete initially installed Export Format and Replication Strategy records:
delete from exp_formatline;
delete from exp_format;
delete from AD_ReplicationTable;
SQL to make the applicable newly created Export Format Lines active:
update exp_formatline 
set isactive = 'Y' 
where exp_formatline_id in 
(select fl.exp_formatline_id
from AD_ReplicationTable r
join exp_format f on (r.ad_table_id = f.ad_table_id and r.ad_client_id = f.ad_client_id)
join exp_formatline fl on (f.exp_format_id = fl.exp_format_id)
)
;

Tangent - Demonstration of Pack Out and Pack In to move Windows and Data

Note: this video show demonstrates moving both (1) moving windows from one system to another as well as (2) the data that resides in the window. The introduction makes you think it just performs #1.

Replication - Target Configuration - Discuss and Demonstrate

Replication - ReSync - When the Link Gets Broken

Replication - PostgreSQL to PostgreSQL Option

Replication - Viewing Messages

iDempiere uses "topic" messages to communicate between instances. Topic messages are not visible through the ActiveMQ admin interface. To see the actual messages, you can use one of the following techniques:
  1. Turn iDempiere's logging to "finest" or "all" and process a message from either the source or target iDempiere instance. The message will be visible in the iDempiere log. Here are the instructions for setting log levels and viewing logs.
  2. Use Hawt.io's tool to view the message. See the below video for instructions.

Connect to a Remote PostgreSQL Instance

Good introduction to DBLink - tool used to query a remote postgresql server DBLink reference docs How to create a linux script to push data over SSH on a schedule 2014-12-18 Replication Discussion