use of com.swiftmq.impl.streams.processor.QueueMessageProcessor in project swiftmq-ce by iitsoftware.
the class QueueInput method start.
@Override
public void start() throws Exception {
if (started)
return;
MessageSelector ms = null;
if (selector != null) {
ms = new MessageSelector(selector);
ms.compile();
}
QueueReceiver receiver = ctx.ctx.queueManager.createQueueReceiver(destinationName, (ActiveLogin) null, ms);
messageProcessor = new QueueMessageProcessor(ctx, this, receiver, ms);
messageProcessor.restart();
started = true;
}
use of com.swiftmq.impl.streams.processor.QueueMessageProcessor in project swiftmq-ce by iitsoftware.
the class TopicInput method start.
@Override
public void start() throws Exception {
if (started)
return;
if (!ctx.ctx.topicManager.isTopicDefined(destinationName))
ctx.ctx.topicManager.createTopic(destinationName);
MessageSelector ms = null;
if (selector != null) {
ms = new MessageSelector(selector);
ms.compile();
}
if (durable) {
ActiveLogin dlogin = ctx.ctx.authenticationSwiftlet.createActiveLogin(clientId, "DURABLE");
dlogin.setClientId(clientId);
TopicImpl topic = ctx.ctx.topicManager.verifyTopic(new TopicImpl(destinationName));
queueName = ctx.ctx.topicManager.subscribeDurable(durableName, topic, ms, false, dlogin);
} else {
queueName = ctx.ctx.queueManager.createTemporaryQueue();
subscriberId = ctx.ctx.topicManager.subscribe(destinationName, ms, false, queueName, true);
}
QueueReceiver receiver = ctx.ctx.queueManager.createQueueReceiver(queueName, (ActiveLogin) null, null);
messageProcessor = new QueueMessageProcessor(ctx, this, receiver, null);
messageProcessor.restart();
started = true;
}
Aggregations