org.apache.activemq.broker.region.Queue.removeMessage()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(131)

本文整理了Java中org.apache.activemq.broker.region.Queue.removeMessage方法的一些代码示例,展示了Queue.removeMessage的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Queue.removeMessage方法的具体详情如下:
包路径:org.apache.activemq.broker.region.Queue
类名称:Queue
方法名:removeMessage

Queue.removeMessage介绍

[英]Removes the message matching the given messageId
[中]删除与给定messageId匹配的消息

代码示例

代码示例来源:origin: apache/activemq

public boolean removeMessage(String messageId) throws Exception {
  return ((Queue)destination).removeMessage(messageId);
}

代码示例来源:origin: apache/activemq

protected void removeMessage(ConnectionContext c, QueueMessageReference r) throws IOException {
  removeMessage(c, null, r);
  pagedInPendingDispatchLock.writeLock().lock();
  try {
    dispatchPendingList.remove(r);
  } finally {
    pagedInPendingDispatchLock.writeLock().unlock();
  }
}

代码示例来源:origin: apache/activemq

/**
 * In the queue case, mark the node as dropped and then a gc cycle will
 * remove it from the queue.
 *
 * @throws IOException
 */
@Override
protected void acknowledge(final ConnectionContext context, final MessageAck ack, final MessageReference n) throws IOException {
  this.setTimeOfLastMessageAck(System.currentTimeMillis());
  final Destination q = (Destination) n.getRegionDestination();
  final QueueMessageReference node = (QueueMessageReference)n;
  final Queue queue = (Queue)q;
  queue.removeMessage(context, this, node, ack);
}

代码示例来源:origin: apache/activemq

@Override
public void messageExpired(ConnectionContext context, Subscription subs, MessageReference reference) {
  LOG.debug("message expired: {}", reference);
  broker.messageExpired(context, reference, subs);
  destinationStatistics.getExpired().increment();
  try {
    removeMessage(context, subs, (QueueMessageReference) reference);
    messagesLock.writeLock().lock();
    try {
      messages.rollback(reference.getMessageId());
    } finally {
      messagesLock.writeLock().unlock();
    }
  } catch (IOException e) {
    LOG.error("Failed to remove expired Message from the store ", e);
  }
}

代码示例来源:origin: apache/activemq

if (filter.evaluate(context, r)) {
  removeMessage(context, r);
  set.remove(r);
  if (++movedCounter >= maximumMessages && maximumMessages > 0) {

代码示例来源:origin: apache/activemq

protected void removeMessage(ConnectionContext c, Subscription subs, QueueMessageReference r) throws IOException {
  MessageAck ack = new MessageAck();
  ack.setAckType(MessageAck.STANDARD_ACK_TYPE);
  ack.setDestination(destination);
  ack.setMessageID(r.getMessageId());
  removeMessage(c, subs, r, ack);
}

代码示例来源:origin: apache/activemq

try {
  QueueMessageReference r = (QueueMessageReference) ref;
  removeMessage(c, r);
  messages.rollback(r.getMessageId());
} catch (IOException e) {

代码示例来源:origin: apache/activemq

removeMessage(context, m);
messagesLock.writeLock().lock();
try {

代码示例来源:origin: org.apache.activemq/activemq-broker

public boolean removeMessage(String messageId) throws Exception {
  return ((Queue)destination).removeMessage(messageId);
}

代码示例来源:origin: pierre/meteo

protected void removeMessage(ConnectionContext c, QueueMessageReference r) throws IOException {
  removeMessage(c, null, r);
  pagedInPendingDispatchLock.writeLock().lock();
  try {
    pagedInPendingDispatch.remove(r);
  } finally {
    pagedInPendingDispatchLock.writeLock().unlock();
  }
}

代码示例来源:origin: org.apache.activemq/activemq-broker

protected void removeMessage(ConnectionContext c, QueueMessageReference r) throws IOException {
  removeMessage(c, null, r);
  pagedInPendingDispatchLock.writeLock().lock();
  try {
    dispatchPendingList.remove(r);
  } finally {
    pagedInPendingDispatchLock.writeLock().unlock();
  }
}

代码示例来源:origin: org.apache.activemq/activemq-all

protected void removeMessage(ConnectionContext c, QueueMessageReference r) throws IOException {
  removeMessage(c, null, r);
  pagedInPendingDispatchLock.writeLock().lock();
  try {
    dispatchPendingList.remove(r);
  } finally {
    pagedInPendingDispatchLock.writeLock().unlock();
  }
}

代码示例来源:origin: org.apache.activemq/activemq-osgi

protected void removeMessage(ConnectionContext c, QueueMessageReference r) throws IOException {
  removeMessage(c, null, r);
  pagedInPendingDispatchLock.writeLock().lock();
  try {
    dispatchPendingList.remove(r);
  } finally {
    pagedInPendingDispatchLock.writeLock().unlock();
  }
}

代码示例来源:origin: org.apache.activemq/activemq-broker

/**
 * In the queue case, mark the node as dropped and then a gc cycle will
 * remove it from the queue.
 *
 * @throws IOException
 */
@Override
protected void acknowledge(final ConnectionContext context, final MessageAck ack, final MessageReference n) throws IOException {
  this.setTimeOfLastMessageAck(System.currentTimeMillis());
  final Destination q = (Destination) n.getRegionDestination();
  final QueueMessageReference node = (QueueMessageReference)n;
  final Queue queue = (Queue)q;
  queue.removeMessage(context, this, node, ack);
}

代码示例来源:origin: pierre/meteo

public void messageExpired(ConnectionContext context, Subscription subs, MessageReference reference) {
  if (LOG.isDebugEnabled()) {
    LOG.debug("message expired: " + reference);
  }
  broker.messageExpired(context, reference, subs);
  destinationStatistics.getExpired().increment();
  try {
    removeMessage(context, subs, (QueueMessageReference) reference);
  } catch (IOException e) {
    LOG.error("Failed to remove expired Message from the store ", e);
  }
}

代码示例来源:origin: org.apache.activemq/activemq-all

/**
 * In the queue case, mark the node as dropped and then a gc cycle will
 * remove it from the queue.
 *
 * @throws IOException
 */
@Override
protected void acknowledge(final ConnectionContext context, final MessageAck ack, final MessageReference n) throws IOException {
  this.setTimeOfLastMessageAck(System.currentTimeMillis());
  final Destination q = (Destination) n.getRegionDestination();
  final QueueMessageReference node = (QueueMessageReference)n;
  final Queue queue = (Queue)q;
  queue.removeMessage(context, this, node, ack);
}

代码示例来源:origin: org.apache.activemq/activemq-broker

protected void removeMessage(ConnectionContext c, Subscription subs, QueueMessageReference r) throws IOException {
  MessageAck ack = new MessageAck();
  ack.setAckType(MessageAck.STANDARD_ACK_TYPE);
  ack.setDestination(destination);
  ack.setMessageID(r.getMessageId());
  removeMessage(c, subs, r, ack);
}

代码示例来源:origin: org.apache.activemq/activemq-all

protected void removeMessage(ConnectionContext c, Subscription subs, QueueMessageReference r) throws IOException {
  MessageAck ack = new MessageAck();
  ack.setAckType(MessageAck.STANDARD_ACK_TYPE);
  ack.setDestination(destination);
  ack.setMessageID(r.getMessageId());
  removeMessage(c, subs, r, ack);
}

代码示例来源:origin: org.apache.activemq/activemq-osgi

protected void removeMessage(ConnectionContext c, Subscription subs, QueueMessageReference r) throws IOException {
  MessageAck ack = new MessageAck();
  ack.setAckType(MessageAck.STANDARD_ACK_TYPE);
  ack.setDestination(destination);
  ack.setMessageID(r.getMessageId());
  removeMessage(c, subs, r, ack);
}

代码示例来源:origin: pierre/meteo

protected void removeMessage(ConnectionContext c, Subscription subs, QueueMessageReference r) throws IOException {
  MessageAck ack = new MessageAck();
  ack.setAckType(MessageAck.STANDARD_ACK_TYPE);
  ack.setDestination(destination);
  ack.setMessageID(r.getMessageId());
  removeMessage(c, subs, r, ack);
}

相关文章

Queue类方法