Package com.amazonaws.services.sqs.model

Examples of com.amazonaws.services.sqs.model.SendMessageRequest


    AmazonSQS sqsClient;
    @Resource
    String sqsQueueUrl;

    public void alert(String message) {
        sqsClient.sendMessage(new SendMessageRequest().withMessageBody(message).withQueueUrl(sqsQueueUrl));
    }
View Full Code Here


  private void sendTaskToSQSQueue(Map<Integer, Long> task)
  {
    String serializedTask = serializeTask(task);
    List<String> queuesUrls = sqsClient.listQueues().getQueueUrls();
    String queueUrl = queuesUrls.get(0);
    sqsClient.sendMessage(new SendMessageRequest(queueUrl, serializedTask));
  }
View Full Code Here

        super(endpoint);
    }

    public void process(Exchange exchange) throws Exception {
        String body = exchange.getIn().getBody(String.class);
        SendMessageRequest request = new SendMessageRequest(getQueueUrl(), body);
        request.setDelaySeconds(getEndpoint().getConfiguration().getDelaySeconds());

        LOG.trace("Sending request [{}] from exchange [{}]...", request, exchange);
       
        SendMessageResult result = getClient().sendMessage(request);
       
View Full Code Here

        super(endpoint);
    }

    public void process(Exchange exchange) throws Exception {
        String body = exchange.getIn().getBody(String.class);
        SendMessageRequest request = new SendMessageRequest(getQueueUrl(), body);

        if (LOG.isTraceEnabled()) {
            LOG.trace("Sending request [" + request + "] from exchange [" + exchange + "]...");
        }
       
View Full Code Here

    @Override
    public void putTask(QSTaskModel task) {
        try {
            LOG.info("Queueing task: {}", task);
            String messageBody = objectMapper.writeValueAsString(task);
            sqs.sendMessage(new SendMessageRequest(queueUrl, messageBody));
            LOG.debug("Queued to {}, message\n\t{}", queueUrl, messageBody);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here

    public void resetTask(QSTaskModel task) {
        try {

            // Re-queue the task in its current state - remainingAttempts has been changed by the WorkerQueueItemHandler.
            String message = objectMapper.writeValueAsString(task);
            sqs.sendMessage(new SendMessageRequest(queueUrl, message));

            // Remove the currently in-flight task.
            closeTask(task);

        } catch (IOException e) {
View Full Code Here

        // nothing
    }

    @Override
    public void log(QSLogModel log) {
        sqs.sendMessage(new SendMessageRequest(queueUrl, thing(log)));
    }
View Full Code Here

        super(endpoint);
    }

    public void process(Exchange exchange) throws Exception {
        String body = exchange.getIn().getBody(String.class);
        SendMessageRequest request = new SendMessageRequest(getQueueUrl(), body);
        request.setDelaySeconds(getEndpoint().getConfiguration().getDelaySeconds());

        LOG.trace("Sending request [{}] from exchange [{}]...", request, exchange);
       
        SendMessageResult result = getClient().sendMessage(request);
       
View Full Code Here

        super(endpoint);
    }

    public void process(Exchange exchange) throws Exception {
        String body = exchange.getIn().getBody(String.class);
        SendMessageRequest request = new SendMessageRequest(getQueueUrl(), body);

        if (LOG.isTraceEnabled()) {
            LOG.trace("Sending request [" + request + "] from exchange [" + exchange + "]...");
        }
       
View Full Code Here

        super(endpoint);
    }

    public void process(Exchange exchange) throws Exception {
        String body = exchange.getIn().getBody(String.class);
        SendMessageRequest request = new SendMessageRequest(getQueueUrl(), body);

        LOG.trace("Sending request [{}] from exchange [{}]...", request, exchange);
       
        SendMessageResult result = getClient().sendMessage(request);
       
View Full Code Here

TOP

Related Classes of com.amazonaws.services.sqs.model.SendMessageRequest

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.