Examples of ONSClientException


Examples of com.aliyun.openservices.ons.api.exception.ONSClientException

        super(properties);
        this.defaultMQPushConsumer = new DefaultMQPushConsumer();

        String consumerGroup = properties.getProperty(PropertyKeyConst.ConsumerId);
        if (null == consumerGroup) {
            throw new ONSClientException("\'ConsumerGroup\' property is null");
        }

        this.defaultMQPushConsumer.setConsumerGroup(consumerGroup);
        this.defaultMQPushConsumer.setInstanceName(this.buildIntanceName());
        this.defaultMQPushConsumer.setNamesrvAddr(this.getNameServerAddr());
View Full Code Here

Examples of com.aliyun.openservices.ons.api.exception.ONSClientException

                this.defaultMQPushConsumer.getDefaultMQPushConsumerImpl().getmQClientFactory()
                    .getMQClientAPIImpl().setSessionCredentials(this.sessionCredentials);
            }
        }
        catch (Exception e) {
            throw new ONSClientException("defaultMQPushConsumer start exception", e);
        }
    }
View Full Code Here

Examples of com.aliyun.openservices.ons.api.exception.ONSClientException


    @Override
    public void subscribe(String topic, String subExpression, MessageOrderListener listener) {
        if (null == topic) {
            throw new ONSClientException("topic is null");
        }

        if (null == listener) {
            throw new ONSClientException("listener is null");
        }

        try {
            this.subscribeTable.put(topic, listener);
            this.defaultMQPushConsumer.subscribe(topic, subExpression);
        }
        catch (MQClientException e) {
            throw new ONSClientException("defaultMQPushConsumer subscribe exception", e);
        }
    }
View Full Code Here

Examples of com.aliyun.openservices.ons.api.exception.ONSClientException

            Message msg = ONSUtil.msgConvert(msgRMQ);
            msg.setMsgID(msgRMQ.getMsgId());

            MessageOrderListener listener = OrderConsumerImpl.this.subscribeTable.get(msg.getTopic());
            if (null == listener) {
                throw new ONSClientException("MessageOrderListener is null");
            }

            final ConsumeOrderContext context = new ConsumeOrderContext();
            OrderAction action = listener.consume(msg, context);
            if (action != null) {
View Full Code Here

Examples of com.aliyun.openservices.ons.api.exception.ONSClientException

                this.defaultMQProducer.getDefaultMQProducerImpl().getmQClientFactory().getMQClientAPIImpl()
                    .setSessionCredentials(this.sessionCredentials);
            }
        }
        catch (Exception e) {
            throw new ONSClientException("defaultMQProducer start exception", e);
        }
    }
View Full Code Here

Examples of com.aliyun.openservices.ons.api.exception.ONSClientException

            SendResult sendResult = new SendResult();
            sendResult.setMessageId(sendResultRMQ.getMsgId());
            return sendResult;
        }
        catch (Exception e) {
            throw new ONSClientException("defaultMQProducer send exception", e);
        }
    }
View Full Code Here

Examples of com.aliyun.openservices.ons.api.exception.ONSClientException

        com.alibaba.rocketmq.common.message.Message msgRMQ = ONSUtil.msgConvert(message);
        try {
            this.defaultMQProducer.sendOneway(msgRMQ);
        }
        catch (Exception e) {
            throw new ONSClientException("defaultMQProducer sendOneway exception", e);
        }
    }
View Full Code Here

Examples of com.aliyun.openservices.ons.api.exception.ONSClientException

                this.defaultMQProducer.getDefaultMQProducerImpl().getmQClientFactory().getMQClientAPIImpl()
                    .setSessionCredentials(this.sessionCredentials);
            }
        }
        catch (Exception e) {
            throw new ONSClientException("defaultMQProducer start exception", e);
        }

    }
View Full Code Here

Examples of com.aliyun.openservices.ons.api.exception.ONSClientException

            SendResult sendResult = new SendResult();
            sendResult.setMessageId(sendResultRMQ.getMsgId());
            return sendResult;
        }
        catch (Exception e) {
            throw new ONSClientException("defaultMQProducer send order exception", e);
        }
    }
View Full Code Here

Examples of com.aliyun.openservices.ons.api.exception.ONSClientException

        super(properties);
        this.defaultMQPushConsumer = new DefaultMQPushConsumer();

        String consumerGroup = properties.getProperty(PropertyKeyConst.ConsumerId);
        if (null == consumerGroup) {
            throw new ONSClientException("\'ConsumerGroup\' property is null");
        }

        this.defaultMQPushConsumer.setConsumerGroup(consumerGroup);
        this.defaultMQPushConsumer.setInstanceName(this.buildIntanceName());
        this.defaultMQPushConsumer.setNamesrvAddr(this.getNameServerAddr());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.