Search in sources :

Example 1 with CreateSubscriberRequest

use of com.swiftmq.jms.smqp.v500.CreateSubscriberRequest in project swiftmq-client by iitsoftware.

the class TopicConnectionConsumerImpl method createSubscriber.

void createSubscriber(TopicImpl topic, String messageSelector) throws JMSException {
    Reply reply = null;
    try {
        reply = requestRegistry.request(new CreateSubscriberRequest(dispatchId, (TopicImpl) topic, messageSelector, false));
    } catch (Exception e) {
        throw ExceptionConverter.convert(e);
    }
    if (reply.isOk()) {
        queueName = ((CreateSubscriberReply) reply).getTmpQueueName();
    } else {
        throw ExceptionConverter.convert(reply.getException());
    }
    fillCache();
}
Also used : Reply(com.swiftmq.tools.requestreply.Reply) CreateSubscriberReply(com.swiftmq.jms.smqp.v400.CreateSubscriberReply) CreateDurableReply(com.swiftmq.jms.smqp.v400.CreateDurableReply) CreateSubscriberRequest(com.swiftmq.jms.smqp.v400.CreateSubscriberRequest) JMSException(javax.jms.JMSException)

Example 2 with CreateSubscriberRequest

use of com.swiftmq.jms.smqp.v500.CreateSubscriberRequest in project swiftmq-client by iitsoftware.

the class TopicConnectionConsumerImpl method createSubscriber.

void createSubscriber(TopicImpl topic, String messageSelector) throws JMSException {
    Reply reply = null;
    try {
        reply = requestRegistry.request(new CreateSubscriberRequest(dispatchId, (TopicImpl) topic, messageSelector, false));
    } catch (Exception e) {
        throw ExceptionConverter.convert(e);
    }
    if (reply.isOk()) {
        queueName = ((CreateSubscriberReply) reply).getTmpQueueName();
    } else {
        throw ExceptionConverter.convert(reply.getException());
    }
    fillCache();
}
Also used : Reply(com.swiftmq.tools.requestreply.Reply) CreateSubscriberReply(com.swiftmq.jms.smqp.v500.CreateSubscriberReply) CreateDurableReply(com.swiftmq.jms.smqp.v500.CreateDurableReply) CreateSubscriberRequest(com.swiftmq.jms.smqp.v500.CreateSubscriberRequest) JMSException(javax.jms.JMSException)

Example 3 with CreateSubscriberRequest

use of com.swiftmq.jms.smqp.v500.CreateSubscriberRequest in project swiftmq-client by iitsoftware.

the class TopicConnectionConsumerImpl method createSubscriber.

void createSubscriber(TopicImpl topic, String messageSelector) throws JMSException {
    Reply reply = null;
    try {
        reply = requestRegistry.request(new CreateSubscriberRequest(dispatchId, topic, messageSelector, false, false));
    } catch (Exception e) {
        throw ExceptionConverter.convert(e);
    }
    if (reply.isOk()) {
        queueName = ((CreateSubscriberReply) reply).getTmpQueueName();
    } else {
        throw ExceptionConverter.convert(reply.getException());
    }
    fillCache();
}
Also used : Reply(com.swiftmq.tools.requestreply.Reply) CreateDurableReply(com.swiftmq.jms.smqp.v510.CreateDurableReply) CreateSubscriberReply(com.swiftmq.jms.smqp.v510.CreateSubscriberReply) CreateSubscriberRequest(com.swiftmq.jms.smqp.v510.CreateSubscriberRequest) JMSException(javax.jms.JMSException)

Aggregations

Reply (com.swiftmq.tools.requestreply.Reply)3 JMSException (javax.jms.JMSException)3 CreateDurableReply (com.swiftmq.jms.smqp.v400.CreateDurableReply)1 CreateSubscriberReply (com.swiftmq.jms.smqp.v400.CreateSubscriberReply)1 CreateSubscriberRequest (com.swiftmq.jms.smqp.v400.CreateSubscriberRequest)1 CreateDurableReply (com.swiftmq.jms.smqp.v500.CreateDurableReply)1 CreateSubscriberReply (com.swiftmq.jms.smqp.v500.CreateSubscriberReply)1 CreateSubscriberRequest (com.swiftmq.jms.smqp.v500.CreateSubscriberRequest)1 CreateDurableReply (com.swiftmq.jms.smqp.v510.CreateDurableReply)1 CreateSubscriberReply (com.swiftmq.jms.smqp.v510.CreateSubscriberReply)1 CreateSubscriberRequest (com.swiftmq.jms.smqp.v510.CreateSubscriberRequest)1