Package org.apache.hedwig.client.data

Examples of org.apache.hedwig.client.data.MessageConsumeData


            .asyncMessageConsume(messageConsumeData.msg);
        }
    }

    public void operationFinished(Object ctx, Void resultOfOperation) {
        MessageConsumeData messageConsumeData = (MessageConsumeData) ctx;
        TopicSubscriber topicSubscriber = new TopicSubscriber(messageConsumeData.topic, messageConsumeData.subscriberId);
        // Message has been successfully consumed by the client app so callback
        // to the ResponseHandler indicating that the message is consumed.
        Channel topicSubscriberChannel = client.getSubscriber().getChannelForTopic(topicSubscriber);
        HedwigClientImpl.getResponseHandlerFromChannel(topicSubscriberChannel).getSubscribeResponseHandler()
View Full Code Here


    public void operationFailed(Object ctx, PubSubException exception) {
        // Message has NOT been successfully consumed by the client app so
        // callback to the ResponseHandler to try the async MessageHandler
        // Consume logic again.
        MessageConsumeData messageConsumeData = (MessageConsumeData) ctx;
        TopicSubscriber topicSubscriber = new TopicSubscriber(messageConsumeData.topic, messageConsumeData.subscriberId);
        logger.error("Message was not consumed successfully by client MessageHandler: " + messageConsumeData);

        // Sleep a pre-configured amount of time (in milliseconds) before we
        // do the retry. In the future, we can have more dynamic logic on
View Full Code Here

            if (logger.isDebugEnabled())
                logger.debug("Too many outstanding messages (" + outstandingMsgSet.size()
                             + ") so throttling the subscribe netty Channel");
            subscribeChannel.setReadable(false);
        }
        MessageConsumeData messageConsumeData = new MessageConsumeData(origSubData.topic, origSubData.subscriberId,
                message);
        messageHandler.deliver(origSubData.topic, origSubData.subscriberId, message, responseHandler.getClient()
                .getConsumeCallback(), messageConsumeData);
    }
View Full Code Here

     *
     * @param message
     *          Message to deliver.
     */
    protected void unsafeDeliverMessage(Message message) {
        MessageConsumeData messageConsumeData =
            new MessageConsumeData(topicSubscriber, message);
        msgHandler.deliver(topicSubscriber.getTopic(), topicSubscriber.getSubscriberId(),
                           message, channelManager.getConsumeCallback(),
                           messageConsumeData);
    }
View Full Code Here

            if (logger.isDebugEnabled())
                logger.debug("Too many outstanding messages (" + outstandingMsgSet.size()
                             + ") so throttling the subscribe netty Channel");
            subscribeChannel.setReadable(false);
        }
        MessageConsumeData messageConsumeData = new MessageConsumeData(origSubData.topic, origSubData.subscriberId,
                message);
        messageHandler.deliver(origSubData.topic, origSubData.subscriberId, message, responseHandler.getClient()
                .getConsumeCallback(), messageConsumeData);
    }
View Full Code Here

                                                         messageConsumeData.msg);
        }
    }

    public void operationFinished(Object ctx, Void resultOfOperation) {
        MessageConsumeData messageConsumeData = (MessageConsumeData) ctx;

        SubscribeResponseHandler subscribeHChannelHandler =
            channelManager.getSubscribeResponseHandler(messageConsumeData.topicSubscriber);
        if (null == subscribeHChannelHandler ||
            !subscribeHChannelHandler.hasSubscription(messageConsumeData.topicSubscriber)) {
View Full Code Here

    public void operationFailed(Object ctx, PubSubException exception) {
        // Message has NOT been successfully consumed by the client app so
        // callback to the HChannelHandler to try the async MessageHandler
        // Consume logic again.
        MessageConsumeData messageConsumeData = (MessageConsumeData) ctx;
        logger.error("Message was not consumed successfully by client MessageHandler: {}",
                     messageConsumeData);

        // Sleep a pre-configured amount of time (in milliseconds) before we
        // do the retry. In the future, we can have more dynamic logic on
View Full Code Here

     *
     * @param message
     *          Message to deliver.
     */
    protected void unsafeDeliverMessage(Message message) {
        MessageConsumeData messageConsumeData =
            new MessageConsumeData(topicSubscriber, message);
        msgHandler.deliver(topicSubscriber.getTopic(), topicSubscriber.getSubscriberId(),
                           message, channelManager.getConsumeCallback(),
                           messageConsumeData);
    }
View Full Code Here

TOP

Related Classes of org.apache.hedwig.client.data.MessageConsumeData

Copyright © 2018 www.massapicom. 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.