Search in sources :

Example 1 with ReplicationMessageParser

use of com.dexels.replication.api.ReplicationMessageParser in project navajo by Dexels.

the class TestSerializeReplicationMessage method testRepl.

@Test
public void testRepl() {
    ReplicationMessageParser parser = new JSONReplicationMessageParserImpl();
    ImmutableMessage m = parser.parseStream(this.getClass().getClassLoader().getResourceAsStream("person.json")).message();
    StreamDocument.replicationMessageToStreamEvents("Person", m, false).compose(StreamDocument.inNavajo("TestService", Optional.empty(), Optional.empty())).lift(StreamDocument.serialize()).lift(StreamDocument.decode("UTF-8")).blockingForEach(e -> {
        System.err.print(e);
    });
}
Also used : ReplicationMessageParser(com.dexels.replication.api.ReplicationMessageParser) JSONReplicationMessageParserImpl(com.dexels.replication.impl.json.JSONReplicationMessageParserImpl) ImmutableMessage(com.dexels.immutable.api.ImmutableMessage) Test(org.junit.Test)

Aggregations

ImmutableMessage (com.dexels.immutable.api.ImmutableMessage)1 ReplicationMessageParser (com.dexels.replication.api.ReplicationMessageParser)1 JSONReplicationMessageParserImpl (com.dexels.replication.impl.json.JSONReplicationMessageParserImpl)1 Test (org.junit.Test)1