/** * Sends a message to the request address and wait indefinitely for a reply. * The temporary queue is used for the REPLYTO_HEADER_NAME, and only one reply per request is expected * * @param request the message to send * @return the reply message * @throws Exception */ public ClientMessage request(final ClientMessage request) throws Exception { return request(request, 0); }
ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.hornetq.management"); ClientMessage managementMessage = managementSession.createMessage(false); ManagementHelper.putAttribute(managementMessage, "core.queue." + queue, "ID"); managementSession.start(); ClientMessage reply = requestor.request(managementMessage); long queueID = (Integer) ManagementHelper.getResult(reply); logMessage.append(queue).append(", ");
/** * Sends a message to the request address and wait indefinitely for a reply. * The temporary queue is used for the REPLYTO_HEADER_NAME, and only one reply per request is expected * * @param request the message to send * @return the reply message * @throws Exception */ public ClientMessage request(final ClientMessage request) throws Exception { return request(request, 0); }