if (sender.getQoS().equals(ProtonQoS.AT_MOST_ONCE)) { sender.send(message); numSent.incrementAndGet();
private void sendMessage(final Message msg) { ByteBuffer b = ByteBuffer.allocate(4); b.putInt(count.getAndIncrement()); b.flip(); LOG.trace("sending message [id: {}] to peer", msg.getMessageId()); if (ProtonQoS.AT_MOST_ONCE.equals(sender.getQoS())) { sender.send(b.array(), msg); sentHandler.handle(null); } else { sender.send(b.array(), msg, res -> { if (Accepted.class.isInstance(res.getRemoteState())) { LOG.trace("message [id: {}, remotelySettled: {}] has been accepted by peer", msg.getMessageId(), res.remotelySettled()); res.settle(); if (sentHandler != null) { sentHandler.handle(null); } } else { LOG.warn("message [id: {}] has not been accepted by peer: {}", msg.getMessageId(), res.getRemoteState()); } }); } } }
details.put(TracingHelper.TAG_MESSAGE_ID.getKey(), messageId); details.put(TracingHelper.TAG_CREDIT.getKey(), sender.getCredit()); details.put(TracingHelper.TAG_QOS.getKey(), sender.getQoS().toString()); currentSpan.log(details);
items.put(Tags.MESSAGE_BUS_DESTINATION.getKey(), sender.getRemoteTarget().getAddress()); items.put(TracingHelper.TAG_QOS.getKey(), sender.getQoS().name()); items.put(TracingHelper.TAG_CREDIT.getKey(), sender.getCredit()); commandContext.getCurrentSpan().log(items);
details.put(TracingHelper.TAG_MESSAGE_ID.getKey(), messageId); details.put(TracingHelper.TAG_CREDIT.getKey(), sender.getCredit()); details.put(TracingHelper.TAG_QOS.getKey(), sender.getQoS().toString()); currentSpan.log(details);
details.put(TracingHelper.TAG_QOS.getKey(), sender.getQoS().toString()); currentSpan.log(details); final TriTuple<Handler<AsyncResult<R>>, Object, Span> handler = TriTuple.of(resultHandler, cacheKey, currentSpan);
this.qos = this.mapQoS(this.sender.getQoS());
String deliveryTag = partition + "_" + offset; Message message = this.converter.toMessage(this.sender.getSource().getAddress(), record); if (this.sender.getQoS() == ProtonQoS.AT_MOST_ONCE) {