0

I'm trying to do a simple aplication in java, that send and recive messages from IronMQ, but when I try to push a message or get a message or clear the queue, java show me this error:

Exception in thread "main" io.iron.ironmq.HTTPException: Not found
at io.iron.ironmq.Client.singleRequest(Client.java:151)
at io.iron.ironmq.Client.request(Client.java:89)
at io.iron.ironmq.Client.post(Client.java:78)
at io.iron.ironmq.Queue.clear(Queue.java:174)

This is the configuration code:

public void send_Message() throws IOException{
    Client client = new Client(projectId, token, Cloud.ironAWSUSEast);
    Queue queue = client.queue("Random");
    String body = "Hello, IronMQ!";
    int timeout = 30;
    int delay = 0;
    int expiresIn = 0;
    String messageId = queue.push(body, timeout, delay, expiresIn);
}

Thanks for the help! :)

4

1 回答 1

1

我在错误日志中看到,该问题出在另一段代码中。具体来说,异常说at io.iron.ironmq.Queue.clear(Queue.java:174)。似乎,您尝试清除不存在的队列。它引发了异常,因为 IronMQ 在这种情况下返回 HTTP 404。

于 2014-11-02T11:28:15.070 回答