public createWithCallbacks ( |
||
transport | The transport. | |
queue | Wombat.MamaQueue | |
callback | MamaPublisherCallback | |
closure | Object | |
topic | string | Symbol on which to publish. |
source | string | The source for market data publishers. (e.g. source.symbol) |
root | string | The root for market data publishers. Used internally. |
리턴 | void |
public int Run() { ParseArgs(); if (helpNeeded) { DisplayUsage(); return(0); } Mama.logToFile(@"mama.log", MamaLogLevel.MAMA_LOG_LEVEL_NORMAL); bridge = Mama.loadBridge(middlewareName); Mama.open(); MamaQueue defaultQueue = Mama.getDefaultEventQueue(bridge); msg = new MamaMsg(); MamaTimer timer = new MamaTimer(); timer.create(defaultQueue, this, interval, null); queueGroup = new MamaQueueGroup(bridge, 1); MamaTransport transport = new MamaTransport(); transport.create(transportName, bridge); MamaSubscription subscription = null; if (nosub == false) { subscription = new MamaSubscription(); subscription.createBasic(transport, defaultQueue, this, inboundTopic); } publisher = new MamaPublisher(); if (pubCb) { publisher.createWithCallbacks(transport, queueGroup.getNextQueue(), this, null, outboundTopic, null, null); } else { publisher.create(transport, outboundTopic); } Mama.start(bridge); Mama.close(); return(0); }
public int Run() { ParseArgs(); if (helpNeeded) { DisplayUsage(); return 0; } Mama.logToFile(@"mama.log", MamaLogLevel.MAMA_LOG_LEVEL_NORMAL); bridge = Mama.loadBridge(middlewareName); Mama.open(); MamaQueue defaultQueue = Mama.getDefaultEventQueue(bridge); msg = new MamaMsg(); MamaTimer timer = new MamaTimer(); timer.create(defaultQueue, this, interval, null); queueGroup = new MamaQueueGroup(bridge, 1); MamaTransport transport = new MamaTransport(); transport.create(transportName, bridge); MamaSubscription subscription = null; if (nosub == false) { subscription = new MamaSubscription(); subscription.createBasic(transport, defaultQueue, this, inboundTopic); } publisher = new MamaPublisher(); if (pubCb) { publisher.createWithCallbacks(transport, queueGroup.getNextQueue(), this, null, outboundTopic, null, null); } else { publisher.create(transport, outboundTopic); } Mama.start(bridge); Mama.close(); return 0; }