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

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

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

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 Broker getRoot() {
  return getNext().getRoot();
}
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

if (message.isExpired()) {
  broker.getRoot().messageExpired(context, message, null);
  if (sendProducerAck) {
    ProducerAck ack = new ProducerAck(producerInfo.getProducerId(), message.getSize());
        broker.getRoot().messageExpired(context, message, null);
        return;
origin: pierre/meteo

public Broker getRoot() {
  return next.getRoot();
}
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: org.apache.activemq/activemq-broker

@Override
public Broker getRoot() {
  return getNext().getRoot();
}
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: org.apache.activemq/activemq-all

@Override
public Broker getRoot() {
  return getNext().getRoot();
}
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: pierre/meteo

public Broker getRoot() {
  return getNext().getRoot();
}

origin: org.apache.activemq/activemq-osgi

@Override
public Broker getRoot() {
  return getNext().getRoot();
}
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);
  }
}
origin: org.apache.activemq/activemq-broker

@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);
  }
}
origin: org.apache.activemq/activemq-all

@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);
  }
}
origin: org.apache.activemq/activemq-broker

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;
  }
}
org.apache.activemq.brokerBrokergetRoot

Javadoc

Ensure we get the Broker at the top of the Stack

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

  • Updating database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • getSystemService (Context)
  • getContentResolver (Context)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JComboBox (javax.swing)
  • Best plugins for Eclipse
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