Translate messages from one message queue system to another
972
Translate messages from one message queue system to another one

| type | producer | consumer |
|---|---|---|
| file | tail(in_channel) | println out_channel, data |
| pg | listen in_channel | select out_channel(data) |
| nats | Subscribe(in_channel) | Publish(out_channel, data) |
docker pull lekovr/mqbridge. See Docker store --in= Producer connect string
--out= Consumer connect string
--bridge= Bridge(s) in form 'in_channel[,out_channel]'
file://postgres://user:pass@host:port/db?sslmode=disablenats://user:pass@host:portSee also: Examples directory
mqbridge uses the following as data source:
in_channelin_channelin_channelmqbridge sends received messages as
out_channelselect out_channel(data)out_channelThis sample shows how to setup pg -> pg bridge.
out_channel = bridge (see function name)create table mqbridge_data (line jsonb);
create or replace function bridge(a jsonb) returns void language plpgsql as
$_$
begin insert into mqbridge_data (line) values(a); end
$_$;
./mqbridge --bridge event,bridge \
--in postgres://op:op@localhost:5432/db0?sslmode=disable \
--out postgres://op:op@localhost:5432/db1?sslmode=disable
notify event, '{"test": 1972}';
select * from mqbridge_data ;
line
----------------
{"test": 1972}
The MIT License (MIT), see LICENSE.
Copyright (c) 2017 Alexey Kovrizhkin [email protected]
Content type
Image
Digest
Size
2.5 MB
Last updated
almost 9 years ago
docker pull lekovr/mqbridge