Tabnine Logo
EventHubClient.createEpochReceiver
Code IndexAdd Tabnine to your IDE (free)

How to use
createEpochReceiver
method
in
com.microsoft.azure.eventhubs.EventHubClient

Best Java code snippets using com.microsoft.azure.eventhubs.EventHubClient.createEpochReceiver (Showing top 3 results out of 315)

origin: Azure/azure-event-hubs-java

/**
 * Synchronous version of {@link #createEpochReceiver(String, String, EventPosition, long)}.
 *
 * @param consumerGroupName the consumer group name that this receiver should be grouped under.
 * @param partitionId       the partition Id that the receiver belongs to. All data received will be from this partition only.
 * @param eventPosition     the position to start receiving the events from. See {@link EventPosition}
 * @param epoch             an unique identifier (epoch value) that the service uses, to enforce partition/lease ownership.
 * @return PartitionReceiver instance which can be used for receiving {@link EventData}.
 * @throws EventHubException if Service Bus service encountered problems during the operation.
 */
default PartitionReceiver createEpochReceiverSync(final String consumerGroupName, final String partitionId, final EventPosition eventPosition, final long epoch) throws EventHubException {
  return ExceptionUtil.sync(() -> this.createEpochReceiver(consumerGroupName, partitionId, eventPosition, epoch).get());
}
origin: Azure/azure-event-hubs-java

/**
 * Synchronous version of {@link #createEpochReceiver(String, String, EventPosition, long)}.
 *
 * @param consumerGroupName the consumer group name that this receiver should be grouped under.
 * @param partitionId       the partition Id that the receiver belongs to. All data received will be from this partition only.
 * @param eventPosition     the position to start receiving the events from. See {@link EventPosition}
 * @param epoch             an unique identifier (epoch value) that the service uses, to enforce partition/lease ownership.
 * @param receiverOptions   the set of options to enable on the event hubs receiver
 * @return PartitionReceiver instance which can be used for receiving {@link EventData}.
 * @throws EventHubException if Service Bus service encountered problems during the operation.
 */
default PartitionReceiver createEpochReceiverSync(final String consumerGroupName, final String partitionId, final EventPosition eventPosition, final long epoch, final ReceiverOptions receiverOptions) throws EventHubException {
  return ExceptionUtil.sync(() -> this.createEpochReceiver(consumerGroupName, partitionId, eventPosition, epoch, receiverOptions).get());
}
origin: Azure/azure-event-hubs-java

options.setPrefetchCount(this.hostContext.getEventProcessorOptions().getPrefetchCount());
receiverFuture = this.eventHubClient.createEpochReceiver(this.partitionContext.getConsumerGroupName(),
    this.partitionContext.getPartitionId(), startAt, epoch, options);
this.internalOperationFuture = receiverFuture;
com.microsoft.azure.eventhubsEventHubClientcreateEpochReceiver

Javadoc

Create a Epoch based EventHub receiver with given partition id and start receiving from the beginning of the partition stream. The receiver is created for a specific EventHub Partition from the specific consumer group.

It is important to pay attention to the following when creating epoch based receiver:

  • Ownership enforcement - Once you created an epoch based receiver, you cannot create a non-epoch receiver to the same consumerGroup-Partition combo until all receivers to the combo are closed.
  • Ownership stealing - If a receiver with higher epoch value is created for a consumerGroup-Partition combo, any older epoch receiver to that combo will be force closed.
  • Any receiver closed due to lost of ownership to a consumerGroup-Partition combo will get ReceiverDisconnectedException for all operations from that receiver.

Popular methods of EventHubClient

  • createSync
  • createPartitionSenderSync
  • send
  • close
  • closeSync
  • sendSync
    Synchronous version of #send(Iterable,String).
  • createReceiver
  • getRuntimeInformation
    Retrieves general information about an event hub (see EventHubRuntimeInformation for details). Retri
  • create
    Factory method to create an instance of EventHubClient using the supplied connectionString. In a nor
  • createReceiverSync
    Synchronous version of #createReceiver(String,String,EventPosition).
  • getPartitionRuntimeInformation
    Retrieves dynamic information about a partition of an event hub (see PartitionRuntimeInformation for
  • createBatch
  • getPartitionRuntimeInformation,
  • createBatch,
  • createEpochReceiverSync,
  • createFromConnectionString,
  • createFromConnectionStringSync,
  • createPartitionSender

Popular in Java

  • Running tasks concurrently on multiple threads
  • onCreateOptionsMenu (Activity)
  • getExternalFilesDir (Context)
  • runOnUiThread (Activity)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JOptionPane (javax.swing)
  • Top 12 Jupyter Notebook extensions
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