MCPcopy Create free account
hub / github.com/Tencent/phxqueue / main

Function main

phxqueue/test/test_consumer_main.cpp:26–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24
25
26int main(int argc, char **argv) {
27 comm::LogFunc log_func;
28 plugin::LoggerGoogle::GetLogger("test_consumer", "/tmp/phxqueue/log", 3, log_func);
29
30 consumer::ConsumerOption opt;
31 opt.topic = "test";
32 opt.ip = "127.0.0.1";
33 opt.port = 8001;
34 opt.nprocs = 3;
35 opt.proc_pid_path = "/tmp/phxqueue/";
36 opt.lock_path_base = "./phxqueueconsumer.lock.";
37 opt.log_func = log_func;
38
39 test::SimpleConsumer consumer(opt);
40 consumer.AddHandlerFactory(1, new comm::DefaultHandlerFactory<test::SimpleHandler>());
41 consumer.Run();
42
43 return 0;
44}
45

Callers

nothing calls this directly

Calls 2

AddHandlerFactoryMethod · 0.80
RunMethod · 0.45

Tested by

no test coverage detected