use of com.xrtb.bidder.ZPublisher in project XRTB by benmfaul.
the class TestSpark method transmit.
public void transmit() throws Exception {
String crid = "111";
WinObject obj = new WinObject();
obj.cost = ".001";
obj.price = ".001";
obj.adId = "123";
obj.cridId = crid;
BidResponse br = new BidResponse();
br.adid = "123";
br.crid = crid;
br.cost = .001;
PixelClickConvertLog cmd = new PixelClickConvertLog();
cmd.ad_id = "123";
cmd.creative_id = crid;
ZPublisher wins = new ZPublisher("tcp://*:5572", "wins");
ZPublisher bids = new ZPublisher("tcp://*:5571", "bids");
ZPublisher clicks = new ZPublisher("tcp://*:5573", "clicks");
for (int j = 0; j < 1000; j++) {
wins.add(obj);
bids.add(br);
cmd.type = PixelClickConvertLog.CLICK;
clicks.add(cmd);
cmd.type = PixelClickConvertLog.PIXEL;
clicks.add(cmd);
}
}
use of com.xrtb.bidder.ZPublisher 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());
}
}
Aggregations