Tabnine Logo
Broker.sendToDeadLetterQueue
Code IndexAdd Tabnine to your IDE (free)

How to use
sendToDeadLetterQueue
method
in
org.apache.activemq.broker.Broker

Best Java code snippets using org.apache.activemq.broker.Broker.sendToDeadLetterQueue (Showing top 20 results out of 315)

origin: apache/activemq

@Override
public boolean sendToDeadLetterQueue(ConnectionContext context, MessageReference messageReference,
                   Subscription subscription, Throwable poisonCause) {
  return getNext().sendToDeadLetterQueue(context, messageReference, subscription, poisonCause);
}
origin: apache/activemq

/**
 *
 * @param context
 * @param node
 * @param poisonCause
 * @throws IOException
 * @throws Exception
 */
protected void sendToDLQ(final ConnectionContext context, final MessageReference node, Throwable poisonCause) throws IOException, Exception {
  broker.getRoot().sendToDeadLetterQueue(context, node, this, poisonCause);
}
origin: apache/activemq

@Override
public void messageExpired(ConnectionContext context, MessageReference node, Subscription subscription) {
  LOG.debug("Message expired {}", node);
  getRoot().sendToDeadLetterQueue(context, node, subscription, new Throwable("Message Expired. Expiration:" + node.getExpiration()));
}
origin: apache/activemq

@Override
public void duplicateFromStore(Message message, Subscription subscription) {
  ConnectionContext connectionContext = createConnectionContext();
  getLog().warn("{}{}, redirecting {} for dlq processing", DUPLICATE_FROM_STORE_MSG_PREFIX, destination, message.getMessageId());
  Throwable cause = new Throwable(DUPLICATE_FROM_STORE_MSG_PREFIX + destination);
  message.setRegionDestination(this);
  broker.getRoot().sendToDeadLetterQueue(connectionContext, message, null, cause);
  MessageAck messageAck = new MessageAck(message, MessageAck.POSION_ACK_TYPE, 1);
  messageAck.setPoisonCause(cause);
  try {
    acknowledge(connectionContext, subscription, messageAck, message);
  } catch (IOException e) {
    getLog().error("Failed to acknowledge duplicate message {} from {} with {}", message.getMessageId(), destination, messageAck);
  }
}
origin: apache/activemq

private void discard(MessageReference message) {
  discarding = true;
  try {
    message.decrementReferenceCount();
    matched.remove(message);
    discarded++;
    if (destination != null) {
      destination.getDestinationStatistics().getDequeues().increment();
    }
    LOG.debug("{}, discarding message {}", this, message);
    Destination dest = (Destination) message.getRegionDestination();
    if (dest != null) {
      dest.messageDiscarded(getContext(), this, message);
    }
    broker.getRoot().sendToDeadLetterQueue(getContext(), message, this, new Throwable("TopicSubDiscard. ID:" + info.getConsumerId()));
  } finally {
    discarding = false;
  }
}
origin: apache/activemq

  store.removeMessage(connectionContext, new MessageAck(ref.getMessage(), MessageAck.POSION_ACK_TYPE, 1));
broker.getRoot().sendToDeadLetterQueue(connectionContext, ref.getMessage(), null, new Throwable("duplicate paged in from cursor for " + destination));
origin: apache/activemq

} else {
  dropped = false;
  return next.sendToDeadLetterQueue(ctx, msgRef, subscription, poisonCause);
origin: org.apache.activemq/activemq-broker

@Override
public boolean sendToDeadLetterQueue(ConnectionContext context, MessageReference messageReference,
                   Subscription subscription, Throwable poisonCause) {
  return getNext().sendToDeadLetterQueue(context, messageReference, subscription, poisonCause);
}
origin: org.apache.activemq/activemq-all

@Override
public boolean sendToDeadLetterQueue(ConnectionContext context, MessageReference messageReference,
                   Subscription subscription, Throwable poisonCause) {
  return getNext().sendToDeadLetterQueue(context, messageReference, subscription, poisonCause);
}
origin: org.apache.activemq/activemq-all

/**
 *
 * @param context
 * @param node
 * @param poisonCause
 * @throws IOException
 * @throws Exception
 */
protected void sendToDLQ(final ConnectionContext context, final MessageReference node, Throwable poisonCause) throws IOException, Exception {
  broker.getRoot().sendToDeadLetterQueue(context, node, this, poisonCause);
}
origin: org.apache.activemq/activemq-broker

/**
 *
 * @param context
 * @param node
 * @param poisonCause
 * @throws IOException
 * @throws Exception
 */
protected void sendToDLQ(final ConnectionContext context, final MessageReference node, Throwable poisonCause) throws IOException, Exception {
  broker.getRoot().sendToDeadLetterQueue(context, node, this, poisonCause);
}
origin: pierre/meteo

/**
 * @param context
 * @param node
 * @throws IOException
 * @throws Exception
 */
protected void sendToDLQ(final ConnectionContext context, final MessageReference node) throws IOException, Exception {
  broker.getRoot().sendToDeadLetterQueue(context, node, this);
}

origin: pierre/meteo

@Override
public void messageExpired(ConnectionContext context, MessageReference node, Subscription subscription) {
  if (LOG.isDebugEnabled()) {
    LOG.debug("Message expired " + node);
  }
  getRoot().sendToDeadLetterQueue(context, node, subscription);
}

origin: org.apache.activemq/activemq-osgi

/**
 *
 * @param context
 * @param node
 * @param poisonCause
 * @throws IOException
 * @throws Exception
 */
protected void sendToDLQ(final ConnectionContext context, final MessageReference node, Throwable poisonCause) throws IOException, Exception {
  broker.getRoot().sendToDeadLetterQueue(context, node, this, poisonCause);
}
origin: org.apache.activemq/activemq-osgi

@Override
public boolean sendToDeadLetterQueue(ConnectionContext context, MessageReference messageReference,
                   Subscription subscription, Throwable poisonCause) {
  return getNext().sendToDeadLetterQueue(context, messageReference, subscription, poisonCause);
}
origin: org.apache.activemq/activemq-broker

@Override
public void messageExpired(ConnectionContext context, MessageReference node, Subscription subscription) {
  LOG.debug("Message expired {}", node);
  getRoot().sendToDeadLetterQueue(context, node, subscription, new Throwable("Message Expired. Expiration:" + node.getExpiration()));
}
origin: org.apache.activemq/activemq-all

@Override
public void messageExpired(ConnectionContext context, MessageReference node, Subscription subscription) {
  LOG.debug("Message expired {}", node);
  getRoot().sendToDeadLetterQueue(context, node, subscription, new Throwable("Message Expired. Expiration:" + node.getExpiration()));
}
origin: org.apache.activemq/activemq-osgi

@Override
public void messageExpired(ConnectionContext context, MessageReference node, Subscription subscription) {
  LOG.debug("Message expired {}", node);
  getRoot().sendToDeadLetterQueue(context, node, subscription, new Throwable("Message Expired. Expiration:" + node.getExpiration()));
}
origin: pierre/meteo

protected void discard(MessageReference message) {
  message.decrementReferenceCount();
  if (LOG.isDebugEnabled()) {
    LOG.debug("Discarding message " + message);
  }
  ConnectionContext ctx = new ConnectionContext(new NonCachedMessageEvaluationContext());
  ctx.setBroker(broker);
  broker.getRoot().sendToDeadLetterQueue(ctx, message, null);
}
origin: org.apache.activemq/activemq-osgi

@Override
public void duplicateFromStore(Message message, Subscription durableSub) {
  ConnectionContext connectionContext = createConnectionContext();
  getLog().warn("duplicate message from store {}, redirecting for dlq processing", message.getMessageId());
  Throwable cause = new Throwable("duplicate from store for " + destination);
  message.setRegionDestination(this);
  broker.getRoot().sendToDeadLetterQueue(connectionContext, message, null, cause);
  MessageAck messageAck = new MessageAck(message, MessageAck.POSION_ACK_TYPE, 1);
  messageAck.setPoisonCause(cause);
  try {
    acknowledge(connectionContext, durableSub, messageAck, message);
  } catch (IOException e) {
    getLog().error("Failed to acknowledge duplicate message {} from {} with {}", message.getMessageId(), destination, messageAck);
  }
}
org.apache.activemq.brokerBrokersendToDeadLetterQueue

Javadoc

A message needs to go the a DLQ

Popular methods of Broker

  • getAdaptor
    Get a Broker from the Broker Stack that is a particular class
  • getDestinationMap
    return a reference destination map of a region based on the destination type
  • removeDestination
  • commitTransaction
    Commits a transaction.
  • forgetTransaction
    Forgets a transaction.
  • getBrokerService
  • getClients
  • getDestinations
  • getPreparedTransactions
    Gets a list of all the prepared xa transactions.
  • getVmConnectorURI
  • removeConsumer
  • acknowledge
  • removeConsumer,
  • acknowledge,
  • addBroker,
  • addConnection,
  • addConsumer,
  • addDestination,
  • addDestinationInfo,
  • addProducer,
  • addSession,
  • beginTransaction

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getExternalFilesDir (Context)
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (Timer)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • JComboBox (javax.swing)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now