/** * Closes the message producer. * <P> * Since a provider may allocate some resources on behalf of a <CODE> * MessageProducer</CODE> * outside the Java virtual machine, clients should close them when they are * not needed. Relying on garbage collection to eventually reclaim these * resources may not be timely enough. * * @throws JMSException if the JMS provider fails to close the producer due * to some internal error. */ @Override public void close() throws JMSException { if (!closed) { dispose(); this.session.asyncSendPacket(info.createRemoveCommand()); } }
void doClose() throws JMSException { dispose(); RemoveInfo removeCommand = info.createRemoveCommand(); LOG.debug("remove: {}, lastDeliveredSequenceId: {}", getConsumerId(), lastDeliveredSequenceId); removeCommand.setLastDeliveredSequenceId(lastDeliveredSequenceId); this.session.asyncSendPacket(removeCommand); }
protected void sendAck(MessageAck ack, boolean lazy) throws JMSException { if (lazy || connection.isSendAcksAsync() || getTransacted()) { asyncSendPacket(ack); } else { syncSendPacket(ack); } }
/** * If we have a zero prefetch specified then send a pull command to the * broker to pull a message we are about to receive */ protected void sendPullCommand(long timeout) throws JMSException { clearDeliveredList(); if (info.getCurrentPrefetchSize() == 0 && unconsumedMessages.isEmpty()) { MessagePull messagePull = new MessagePull(); messagePull.configure(info); messagePull.setTimeout(timeout); session.asyncSendPacket(messagePull); } }
ack.setFirstMessageId(md.getMessage().getMessageId()); ack.setPoisonCause(new Throwable("Exceeded ra redelivery policy limit:" + redeliveryPolicy)); asyncSendPacket(ack); asyncSendPacket(ack);
asyncSendPacket(earlyAck); } catch (Throwable t) { LOG.error("error dispatching ack: {} ", earlyAck, t); if (ack.getTransactionId() == null) { try { asyncSendPacket(ack); } catch (Throwable e) { connection.onClientInternalException(e);
void doClose() throws JMSException { dispose(); RemoveInfo removeCommand = info.createRemoveCommand(); if (LOG.isDebugEnabled()) { LOG.debug("remove: " + this.getConsumerId() + ", lastDeliveredSequenceId:" + lastDeliveredSequenceId); } removeCommand.setLastDeliveredSequenceId(lastDeliveredSequenceId); this.session.asyncSendPacket(removeCommand); }
/** * Closes the message producer. * <P> * Since a provider may allocate some resources on behalf of a <CODE> * MessageProducer</CODE> * outside the Java virtual machine, clients should close them when they are * not needed. Relying on garbage collection to eventually reclaim these * resources may not be timely enough. * * @throws JMSException if the JMS provider fails to close the producer due * to some internal error. */ @Override public void close() throws JMSException { if (!closed) { dispose(); this.session.asyncSendPacket(info.createRemoveCommand()); } }
/** * Closes the message producer. * <P> * Since a provider may allocate some resources on behalf of a <CODE> * MessageProducer</CODE> * outside the Java virtual machine, clients should close them when they are * not needed. Relying on garbage collection to eventually reclaim these * resources may not be timely enough. * * @throws JMSException if the JMS provider fails to close the producer due * to some internal error. */ @Override public void close() throws JMSException { if (!closed) { dispose(); this.session.asyncSendPacket(info.createRemoveCommand()); } }
void doClose() throws JMSException { dispose(); RemoveInfo removeCommand = info.createRemoveCommand(); LOG.debug("remove: {}, lastDeliveredSequenceId: {}", getConsumerId(), lastDeliveredSequenceId); removeCommand.setLastDeliveredSequenceId(lastDeliveredSequenceId); this.session.asyncSendPacket(removeCommand); }
protected void sendAck(MessageAck ack, boolean lazy) throws JMSException { if (lazy || connection.isSendAcksAsync() || getTransacted()) { asyncSendPacket(ack); } else { syncSendPacket(ack); } }
protected void sendAck(MessageAck ack, boolean lazy) throws JMSException { if (lazy || connection.isSendAcksAsync() || getTransacted()) { asyncSendPacket(ack); } else { syncSendPacket(ack); } }
void doClose() throws JMSException { dispose(); RemoveInfo removeCommand = info.createRemoveCommand(); LOG.debug("remove: {}, lastDeliveredSequenceId: {}", getConsumerId(), lastDeliveredSequenceId); removeCommand.setLastDeliveredSequenceId(lastDeliveredSequenceId); this.session.asyncSendPacket(removeCommand); }
protected void sendAck(MessageAck ack, boolean lazy) throws JMSException { if (lazy || connection.isSendAcksAsync() || getTransacted()) { asyncSendPacket(ack); } else { syncSendPacket(ack); } }
void doClose() throws JMSException { dispose(); RemoveInfo removeCommand = info.createRemoveCommand(); LOG.debug("remove: {}, lastDeliveredSequenceId: {}", getConsumerId(), lastDeliveredSequenceId); removeCommand.setLastDeliveredSequenceId(lastDeliveredSequenceId); this.session.asyncSendPacket(removeCommand); }
protected void sendAck(MessageAck ack, boolean lazy) throws JMSException { if (lazy || connection.isSendAcksAsync() || getTransacted()) { asyncSendPacket(ack); } else { syncSendPacket(ack); } }
/** * If we have a zero prefetch specified then send a pull command to the * broker to pull a message we are about to receive */ protected void sendPullCommand(long timeout) throws JMSException { clearDeliveredList(); if (info.getCurrentPrefetchSize() == 0 && unconsumedMessages.isEmpty()) { MessagePull messagePull = new MessagePull(); messagePull.configure(info); messagePull.setTimeout(timeout); session.asyncSendPacket(messagePull); } }
/** * If we have a zero prefetch specified then send a pull command to the * broker to pull a message we are about to receive */ protected void sendPullCommand(long timeout) throws JMSException { clearDispatchList(); if (info.getPrefetchSize() == 0 && unconsumedMessages.isEmpty()) { MessagePull messagePull = new MessagePull(); messagePull.configure(info); messagePull.setTimeout(timeout); session.asyncSendPacket(messagePull); } }
/** * If we have a zero prefetch specified then send a pull command to the * broker to pull a message we are about to receive */ protected void sendPullCommand(long timeout) throws JMSException { clearDeliveredList(); if (info.getCurrentPrefetchSize() == 0 && unconsumedMessages.isEmpty()) { MessagePull messagePull = new MessagePull(); messagePull.configure(info); messagePull.setTimeout(timeout); session.asyncSendPacket(messagePull); } }
/** * If we have a zero prefetch specified then send a pull command to the * broker to pull a message we are about to receive */ protected void sendPullCommand(long timeout) throws JMSException { clearDeliveredList(); if (info.getCurrentPrefetchSize() == 0 && unconsumedMessages.isEmpty()) { MessagePull messagePull = new MessagePull(); messagePull.configure(info); messagePull.setTimeout(timeout); session.asyncSendPacket(messagePull); } }