/** * Sends an acknowledgement for a specific message. It means that the message has been handled and processed by the * client. The <code>id</code> parameter is the message id received in the frame. * @param id the message id of the message to acknowledge * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */ public io.vertx.rxjava.ext.stomp.StompClientConnection ack(String id) { delegate.ack(id); return this; }
/** * Sends an acknowledgement for a specific message. It means that the message has been handled and processed by the * client. The <code>id</code> parameter is the message id received in the frame. * @param id the message id of the message to acknowledge * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the acknowledgment has been processed by the server. The handler receives the sent frame (<code>ACK</code>). * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */ public io.vertx.rxjava.ext.stomp.StompClientConnection ack(String id, Handler<Frame> receiptHandler) { delegate.ack(id, receiptHandler); return this; }
/** * Sends an acknowledgement for a specific message. It means that the message has been handled and processed by the * client. The <code>id</code> parameter is the message id received in the frame. * @param id the message id of the message to acknowledge * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */ public io.vertx.rxjava.ext.stomp.StompClientConnection ack(String id) { delegate.ack(id); return this; }
/** * Sends an acknowledgement for the given frame. It means that the frame has been handled and processed by the * client. The sent acknowledgement is part of the transaction identified by the given id. * @param id the message id of the message to acknowledge * @param txId the transaction id * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */ public io.vertx.rxjava.ext.stomp.StompClientConnection ack(String id, String txId) { delegate.ack(id, txId); return this; }
/** * Sends an acknowledgement for the given frame. It means that the frame has been handled and processed by the * client. The sent acknowledgement is part of the transaction identified by the given id. * @param id the message id of the message to acknowledge * @param txId the transaction id * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the acknowledgment has been processed by the server. The handler receives the sent frame (<code>ACK</code>). * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */ public io.vertx.rxjava.ext.stomp.StompClientConnection ack(String id, String txId, Handler<Frame> receiptHandler) { delegate.ack(id, txId, receiptHandler); return this; }
/** * Sends an acknowledgement for a specific message. It means that the message has been handled and processed by the * client. The <code>id</code> parameter is the message id received in the frame. * @param id the message id of the message to acknowledge * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the acknowledgment has been processed by the server. The handler receives the sent frame (<code>ACK</code>). * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */ public io.vertx.rxjava.ext.stomp.StompClientConnection ack(String id, Handler<Frame> receiptHandler) { delegate.ack(id, receiptHandler); return this; }
/** * Sends an acknowledgement for the given frame. It means that the frame has been handled and processed by the * client. The sent acknowledgement is part of the transaction identified by the given id. * @param id the message id of the message to acknowledge * @param txId the transaction id * @param receiptHandler the handler invoked when the <code>RECEIPT</code> frame associated with the acknowledgment has been processed by the server. The handler receives the sent frame (<code>ACK</code>). * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */ public io.vertx.rxjava.ext.stomp.StompClientConnection ack(String id, String txId, Handler<Frame> receiptHandler) { delegate.ack(id, txId, receiptHandler); return this; }
/** * Sends an acknowledgement for the given frame. It means that the frame has been handled and processed by the * client. The sent acknowledgement is part of the transaction identified by the given id. * @param id the message id of the message to acknowledge * @param txId the transaction id * @return the current {@link io.vertx.rxjava.ext.stomp.StompClientConnection} */ public io.vertx.rxjava.ext.stomp.StompClientConnection ack(String id, String txId) { delegate.ack(id, txId); return this; }
public static io.vertx.ext.stomp.StompClientConnection ack(io.vertx.ext.stomp.StompClientConnection j_receiver, java.lang.String id, java.lang.String txId, io.vertx.core.Handler<java.util.Map<String, Object>> receiptHandler) { io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.ack(id, txId, receiptHandler != null ? event -> receiptHandler.handle(event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null) : null)); return j_receiver; } public static io.vertx.ext.stomp.StompClientConnection nack(io.vertx.ext.stomp.StompClientConnection j_receiver, java.lang.String id, java.lang.String txId, io.vertx.core.Handler<java.util.Map<String, Object>> receiptHandler) {
public static io.vertx.ext.stomp.StompClientConnection ack(io.vertx.ext.stomp.StompClientConnection j_receiver, java.lang.String id, io.vertx.core.Handler<java.util.Map<String, Object>> receiptHandler) { io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.ack(id, receiptHandler != null ? event -> receiptHandler.handle(event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null) : null)); return j_receiver; } public static io.vertx.ext.stomp.StompClientConnection nack(io.vertx.ext.stomp.StompClientConnection j_receiver, java.lang.String id, io.vertx.core.Handler<java.util.Map<String, Object>> receiptHandler) {
private void handleEvent(Subscription sub, SerializedEvent serializedEvent, String ackHeader) { sub.ackOrderTracker.add(ackHeader); sub.handler.apply(serializedEvent).handle((result, e) -> { if (e != null) { // TODO - what else to do here??? logger.error("Failed handler for subscription {} for event {}", e, sub.subscriberId, serializedEvent); } else { logger.trace("Successfully completed handler for subscription {} for event {}", sub.subscriberId, serializedEvent); context.runOnContext(ignored -> { for (String ah : sub.ackOrderTracker.ack(ackHeader)) { if (logger.isTraceEnabled()) logger.trace("Sending acknowledgement: " + ah); state.connection.ack(ah); } logger.trace("Pending ack headers {} {}", sub.subscriberId, sub.ackOrderTracker.getPendingHeaders().size()); }); } return null; }); }
private void handleEvent(Subscription sub, SerializedEvent serializedEvent, String ackHeader) { sub.ackOrderTracker.add(ackHeader); sub.handler.apply(serializedEvent).handle((result, e) -> { if (e != null) { // TODO - what else to do here??? logger.error("Failed handler for subscription {} for event {}", e, sub.subscriberId, serializedEvent); } else { logger.trace("Successfully completed handler for subscription {} for event {}", sub.subscriberId, serializedEvent); context.runOnContext(ignored -> { for (String ah : sub.ackOrderTracker.ack(ackHeader)) { if (logger.isTraceEnabled()) logger.trace("Sending acknowledgement: " + ah); state.connection.ack(ah); } logger.trace("Pending ack headers {} {}", sub.subscriberId, sub.ackOrderTracker.getPendingHeaders().size()); }); } return null; }); }