Tabnine Logo
ConsumerControl.setConsumerId
Code IndexAdd Tabnine to your IDE (free)

How to use
setConsumerId
method
in
org.apache.activemq.command.ConsumerControl

Best Java code snippets using org.apache.activemq.command.ConsumerControl.setConsumerId (Showing top 20 results out of 315)

Refine searchRefine arrow

  • ConsumerControl.setClose
  • ConsumerControl.setPrefetch
origin: apache/activemq

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
  super.looseUnmarshal(wireFormat, o, dataIn);
  ConsumerControl info = (ConsumerControl)o;
  info.setClose(dataIn.readBoolean());
  info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn));
  info.setPrefetch(dataIn.readInt());
}
origin: apache/activemq

public void connectionInterruptProcessingComplete(Transport transport, ConnectionId connectionId) {
  ConnectionState connectionState = connectionStates.get(connectionId);
  if (connectionState != null) {
    connectionState.setConnectionInterruptProcessingComplete(true);
    Map<ConsumerId, ConsumerInfo> stalledConsumers = connectionState.getRecoveringPullConsumers();
    for (Entry<ConsumerId, ConsumerInfo> entry: stalledConsumers.entrySet()) {
      ConsumerControl control = new ConsumerControl();
      control.setConsumerId(entry.getKey());
      control.setPrefetch(entry.getValue().getPrefetchSize());
      control.setDestination(entry.getValue().getDestination());
      try {
        if (LOG.isDebugEnabled()) {
          LOG.debug("restored recovering consumer: " + control.getConsumerId() + " with: " + control.getPrefetch());
        }
        transport.oneway(control);
      } catch (Exception ex) {
        if (LOG.isDebugEnabled()) {
          LOG.debug("Failed to submit control for consumer: " + control.getConsumerId()
              + " with: " + control.getPrefetch(), ex);
        }
      }
    }
    stalledConsumers.clear();
  }
}
origin: apache/activemq

  stopConsumer.setConsumerId(subscription.getConsumerInfo().getConsumerId());
  stopConsumer.setClose(true);
  connection.dispatchAsync(stopConsumer);
} catch (Exception e) {
origin: apache/activemq

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
  super.tightUnmarshal(wireFormat, o, dataIn, bs);
  ConsumerControl info = (ConsumerControl)o;
  info.setClose(bs.readBoolean());
  info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
  info.setPrefetch(dataIn.readInt());
}
origin: apache/activemq

/**
 * inform the MessageConsumer on the client to change it's prefetch
 *
 * @param newPrefetch
 */
@Override
public void updateConsumerPrefetch(int newPrefetch) {
  if (context != null && context.getConnection() != null && context.getConnection().isManageable()) {
    ConsumerControl cc = new ConsumerControl();
    cc.setConsumerId(info.getConsumerId());
    cc.setPrefetch(newPrefetch);
    context.getConnection().dispatchAsync(cc);
  }
}
origin: pierre/meteo

stopConsumer.setConsumerId(entry.getKey().getConsumerInfo().getConsumerId());
stopConsumer.setClose(true);
connection.dispatchAsync(stopConsumer);
origin: apache/activemq

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
  super.looseUnmarshal(wireFormat, o, dataIn);
  ConsumerControl info = (ConsumerControl)o;
  info.setClose(dataIn.readBoolean());
  info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn));
  info.setPrefetch(dataIn.readInt());
  info.setFlush(dataIn.readBoolean());
  info.setStart(dataIn.readBoolean());
  info.setStop(dataIn.readBoolean());
}
origin: apache/activemq

/**
 * inform the MessageConsumer on the client to change it's prefetch
 *
 * @param newPrefetch
 */
@Override
public void updateConsumerPrefetch(int newPrefetch) {
  if (context != null && context.getConnection() != null && context.getConnection().isManageable()) {
    ConsumerControl cc = new ConsumerControl();
    cc.setConsumerId(info.getConsumerId());
    cc.setPrefetch(newPrefetch);
    context.getConnection().dispatchAsync(cc);
  }
}
origin: org.apache.activemq/activemq-broker

  stopConsumer.setConsumerId(subscription.getConsumerInfo().getConsumerId());
  stopConsumer.setClose(true);
  connection.dispatchAsync(stopConsumer);
} catch (Exception e) {
origin: apache/activemq

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
  super.looseUnmarshal(wireFormat, o, dataIn);
  ConsumerControl info = (ConsumerControl)o;
  info.setClose(dataIn.readBoolean());
  info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn));
  info.setPrefetch(dataIn.readInt());
  info.setFlush(dataIn.readBoolean());
  info.setStart(dataIn.readBoolean());
  info.setStop(dataIn.readBoolean());
}
origin: org.apache.activemq/activemq-client

public void connectionInterruptProcessingComplete(Transport transport, ConnectionId connectionId) {
  ConnectionState connectionState = connectionStates.get(connectionId);
  if (connectionState != null) {
    connectionState.setConnectionInterruptProcessingComplete(true);
    Map<ConsumerId, ConsumerInfo> stalledConsumers = connectionState.getRecoveringPullConsumers();
    for (Entry<ConsumerId, ConsumerInfo> entry: stalledConsumers.entrySet()) {
      ConsumerControl control = new ConsumerControl();
      control.setConsumerId(entry.getKey());
      control.setPrefetch(entry.getValue().getPrefetchSize());
      control.setDestination(entry.getValue().getDestination());
      try {
        if (LOG.isDebugEnabled()) {
          LOG.debug("restored recovering consumer: " + control.getConsumerId() + " with: " + control.getPrefetch());
        }
        transport.oneway(control);
      } catch (Exception ex) {
        if (LOG.isDebugEnabled()) {
          LOG.debug("Failed to submit control for consumer: " + control.getConsumerId()
              + " with: " + control.getPrefetch(), ex);
        }
      }
    }
    stalledConsumers.clear();
  }
}
origin: org.apache.activemq/activemq-all

  stopConsumer.setConsumerId(subscription.getConsumerInfo().getConsumerId());
  stopConsumer.setClose(true);
  connection.dispatchAsync(stopConsumer);
} catch (Exception e) {
origin: apache/activemq

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
  super.looseUnmarshal(wireFormat, o, dataIn);
  ConsumerControl info = (ConsumerControl)o;
  info.setClose(dataIn.readBoolean());
  info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn));
  info.setPrefetch(dataIn.readInt());
  info.setFlush(dataIn.readBoolean());
  info.setStart(dataIn.readBoolean());
  info.setStop(dataIn.readBoolean());
}
origin: org.apache.activemq/activemq-osgi

public void connectionInterruptProcessingComplete(Transport transport, ConnectionId connectionId) {
  ConnectionState connectionState = connectionStates.get(connectionId);
  if (connectionState != null) {
    connectionState.setConnectionInterruptProcessingComplete(true);
    Map<ConsumerId, ConsumerInfo> stalledConsumers = connectionState.getRecoveringPullConsumers();
    for (Entry<ConsumerId, ConsumerInfo> entry: stalledConsumers.entrySet()) {
      ConsumerControl control = new ConsumerControl();
      control.setConsumerId(entry.getKey());
      control.setPrefetch(entry.getValue().getPrefetchSize());
      control.setDestination(entry.getValue().getDestination());
      try {
        if (LOG.isDebugEnabled()) {
          LOG.debug("restored recovering consumer: " + control.getConsumerId() + " with: " + control.getPrefetch());
        }
        transport.oneway(control);
      } catch (Exception ex) {
        if (LOG.isDebugEnabled()) {
          LOG.debug("Failed to submit control for consumer: " + control.getConsumerId()
              + " with: " + control.getPrefetch(), ex);
        }
      }
    }
    stalledConsumers.clear();
  }
}
origin: org.apache.activemq/activemq-osgi

  stopConsumer.setConsumerId(subscription.getConsumerInfo().getConsumerId());
  stopConsumer.setClose(true);
  connection.dispatchAsync(stopConsumer);
} catch (Exception e) {
origin: apache/activemq

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
  super.looseUnmarshal(wireFormat, o, dataIn);
  ConsumerControl info = (ConsumerControl)o;
  info.setClose(dataIn.readBoolean());
  info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn));
  info.setPrefetch(dataIn.readInt());
  info.setFlush(dataIn.readBoolean());
  info.setStart(dataIn.readBoolean());
  info.setStop(dataIn.readBoolean());
}
origin: pierre/meteo

public void connectionInterruptProcessingComplete(Transport transport, ConnectionId connectionId) {
  ConnectionState connectionState = connectionStates.get(connectionId);
  if (connectionState != null) {
    connectionState.setConnectionInterruptProcessingComplete(true);
    Map<ConsumerId, ConsumerInfo> stalledConsumers = connectionState.getRecoveringPullConsumers();
    for (Entry<ConsumerId, ConsumerInfo> entry: stalledConsumers.entrySet()) {
      ConsumerControl control = new ConsumerControl();
      control.setConsumerId(entry.getKey());
      control.setPrefetch(entry.getValue().getPrefetchSize());
      control.setDestination(entry.getValue().getDestination());
      try {
        if (LOG.isDebugEnabled()) {
          LOG.debug("restored recovering consumer: " + control.getConsumerId() + " with: " + control.getPrefetch());
        }
        transport.oneway(control);  
      } catch (Exception ex) {
        if (LOG.isDebugEnabled()) {
          LOG.debug("Failed to submit control for consumer: " + control.getConsumerId()
              + " with: " + control.getPrefetch(), ex);
        }
      }
    }
    stalledConsumers.clear();
  }
}
origin: apache/activemq

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
  super.looseUnmarshal(wireFormat, o, dataIn);
  ConsumerControl info = (ConsumerControl)o;
  info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
  info.setClose(dataIn.readBoolean());
  info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn));
  info.setPrefetch(dataIn.readInt());
  info.setFlush(dataIn.readBoolean());
  info.setStart(dataIn.readBoolean());
  info.setStop(dataIn.readBoolean());
}
origin: org.apache.activemq/activemq-broker

/**
 * inform the MessageConsumer on the client to change it's prefetch
 *
 * @param newPrefetch
 */
@Override
public void updateConsumerPrefetch(int newPrefetch) {
  if (context != null && context.getConnection() != null && context.getConnection().isManageable()) {
    ConsumerControl cc = new ConsumerControl();
    cc.setConsumerId(info.getConsumerId());
    cc.setPrefetch(newPrefetch);
    context.getConnection().dispatchAsync(cc);
  }
}
origin: apache/activemq

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
  super.looseUnmarshal(wireFormat, o, dataIn);
  ConsumerControl info = (ConsumerControl)o;
  info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
  info.setClose(dataIn.readBoolean());
  info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn));
  info.setPrefetch(dataIn.readInt());
  info.setFlush(dataIn.readBoolean());
  info.setStart(dataIn.readBoolean());
  info.setStop(dataIn.readBoolean());
}
org.apache.activemq.commandConsumerControlsetConsumerId

Popular methods of ConsumerControl

  • <init>
  • setPrefetch
  • setDestination
  • getConsumerId
  • getPrefetch
  • getDestination
  • setClose
  • isClose
  • isFlush
  • isStart
  • isStop
  • setFlush
  • isStop,
  • setFlush,
  • setStart,
  • setStop

Popular in Java

  • Making http requests using okhttp
  • getSystemService (Context)
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Runner (org.openjdk.jmh.runner)
  • Top PhpStorm plugins
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