Search in sources :

Example 1 with BasicCommand

use of com.xrtb.commands.BasicCommand in project XRTB by benmfaul.

the class TestZZZRedis method testSetup.

@BeforeClass
public static void testSetup() {
    try {
        Config.setup();
        System.out.println("******************  TestZZZRedis");
        com.xrtb.jmq.RTopic channel = new com.xrtb.jmq.RTopic("tcp://*:5575");
        channel.subscribe("responses");
        channel.addListener(new com.xrtb.jmq.MessageListener<BasicCommand>() {

            @Override
            public void onMessage(String channel, BasicCommand cmd) {
                System.out.println("<<<<<<<<<<<<<<<<<" + cmd);
                rcv = cmd;
                latch.countDown();
            }
        });
        commands = new ZPublisher("tcp://*:5580", "commands");
    } catch (Exception error) {
        error.printStackTrace();
        fail("No connection: " + error.toString());
    }
}
Also used : BasicCommand(com.xrtb.commands.BasicCommand) ZPublisher(com.xrtb.bidder.ZPublisher) BeforeClass(org.junit.BeforeClass)

Aggregations

ZPublisher (com.xrtb.bidder.ZPublisher)1 BasicCommand (com.xrtb.commands.BasicCommand)1 BeforeClass (org.junit.BeforeClass)1