public class ManagedStreamingIngestClient extends IngestClientBase implements QueuedIngestClient
ManagedStreamingIngestClient
This class combines a managed streaming client with a queued streaming client, to create an optimized experience.
Since the streaming client communicates directly with the engine, it's more prone to failure, so this class
holds both a streaming client and a queued client.
It retries 2 times using the streaming client, after which it falls back to the queued streaming client in case of failure.
By default the policy for choosing a queued ingestion on the first try is the checking of weather the size of the estimated
raw stream size (a conversion to compressed CSV) is bigger than 4MB, it will fall back to the queued streaming client.
Use setQueuingPolicyFactor(double) to override the predicate heuristics.
Use SourceInfo.setRawSizeInBytes to set the raw size of the data.
| Modifier and Type | Field and Description |
|---|---|
static String |
CLASS_NAME |
static int |
RETRY_COUNT |
| Constructor and Description |
|---|
ManagedStreamingIngestClient(ConnectionStringBuilder ingestionEndpointConnectionStringBuilder,
ConnectionStringBuilder queryEndpointConnectionStringBuilder)
Deprecated.
- This method is slated to be private. Use
IngestClientFactory.createManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder)
instead. |
ManagedStreamingIngestClient(ConnectionStringBuilder ingestionEndpointConnectionStringBuilder,
ConnectionStringBuilder queryEndpointConnectionStringBuilder,
boolean autoCorrectEndpoint) |
ManagedStreamingIngestClient(ConnectionStringBuilder ingestionEndpointConnectionStringBuilder,
ConnectionStringBuilder queryEndpointConnectionStringBuilder,
@Nullable HttpClientProperties properties) |
ManagedStreamingIngestClient(ConnectionStringBuilder ingestionEndpointConnectionStringBuilder,
ConnectionStringBuilder queryEndpointConnectionStringBuilder,
@Nullable HttpClientProperties properties,
boolean autoCorrectEndpoint)
Deprecated.
- This method is slated to be private. Use
IngestClientFactory.createManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder, HttpClientProperties) instead.
This constructor should only be used for advanced cases. If your endpoints are standard, or you do not know, use
ManagedStreamingIngestClient(ConnectionStringBuilder, HttpClientProperties))} instead. |
ManagedStreamingIngestClient(ConnectionStringBuilder connectionStringBuilder,
@Nullable com.azure.core.http.HttpClient httpClient) |
ManagedStreamingIngestClient(ConnectionStringBuilder connectionStringBuilder,
@Nullable com.azure.core.http.HttpClient httpClient,
boolean autoCorrectEndpoint) |
ManagedStreamingIngestClient(ConnectionStringBuilder connectionStringBuilder,
@Nullable HttpClientProperties properties) |
ManagedStreamingIngestClient(ConnectionStringBuilder connectionStringBuilder,
@Nullable HttpClientProperties properties,
boolean autoCorrectEndpoint) |
ManagedStreamingIngestClient(com.microsoft.azure.kusto.ingest.ResourceManager resourceManager,
AzureStorageClient storageClient,
StreamingClient streamingClient)
Deprecated.
- This method is slated to be private. Use
IngestClientFactory.createManagedStreamingIngestClient(ConnectionStringBuilder) instead. |
ManagedStreamingIngestClient(com.microsoft.azure.kusto.ingest.ResourceManager resourceManager,
AzureStorageClient storageClient,
StreamingClient streamingClient,
ExponentialRetry retryTemplate) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static ManagedStreamingIngestClient |
fromDmConnectionString(ConnectionStringBuilder dmConnectionString)
Deprecated.
- Ingest clients now automatically deduce the endpoint, use
ManagedStreamingIngestClient(ConnectionStringBuilder, HttpClientProperties) instead.
Creates a new ManagedStreamingIngestClient from a DM connection string, with default http client properties.
This method infers the engine connection string from the DM connection string.
For advanced usage, use ManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder) |
static ManagedStreamingIngestClient |
fromDmConnectionString(ConnectionStringBuilder dmConnectionString,
@Nullable HttpClientProperties properties)
Deprecated.
- Ingest clients now automatically deduce the endpoint, use
ManagedStreamingIngestClient(ConnectionStringBuilder, HttpClientProperties) instead.
Creates a new ManagedStreamingIngestClient from a DM connection string.
This method infers the engine connection string from the DM connection string.
For advanced usage, use ManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder) |
static ManagedStreamingIngestClient |
fromEngineConnectionString(ConnectionStringBuilder engineConnectionString)
Deprecated.
- Ingest clients now automatically deduce the endpoint, use
ManagedStreamingIngestClient(ConnectionStringBuilder, HttpClientProperties) instead.
Creates a new ManagedStreamingIngestClient from an engine connection string, with default http client properties.
This method infers the DM connection string from the engine connection string.
For advanced usage, use ManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder) |
static ManagedStreamingIngestClient |
fromEngineConnectionString(ConnectionStringBuilder engineConnectionString,
@Nullable HttpClientProperties properties)
Deprecated.
- Ingest clients now automatically deduce the endpoint, use
ManagedStreamingIngestClient(ConnectionStringBuilder, HttpClientProperties) instead.
Creates a new ManagedStreamingIngestClient from an engine connection string.
This method infers the DM connection string from the engine connection string.
For advanced usage, use ManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder) |
protected String |
getClientType() |
IngestionResourceManager |
getResourceManager() |
protected reactor.core.publisher.Mono<IngestionResult> |
ingestFromBlobAsyncImpl(BlobSourceInfo blobSourceInfo,
IngestionProperties ingestionProperties) |
protected reactor.core.publisher.Mono<IngestionResult> |
ingestFromFileAsyncImpl(FileSourceInfo fileSourceInfo,
IngestionProperties ingestionProperties) |
protected reactor.core.publisher.Mono<IngestionResult> |
ingestFromResultSetAsyncImpl(ResultSetSourceInfo resultSetSourceInfo,
IngestionProperties ingestionProperties) |
protected reactor.core.publisher.Mono<IngestionResult> |
ingestFromStreamAsyncImpl(StreamSourceInfo streamSourceInfo,
IngestionProperties ingestionProperties) |
void |
setQueueRequestOptions(com.azure.storage.common.policy.RequestRetryOptions queueRequestOptions)
Setter for QueueRequestOptions used by the client on adding ingest message to the Azure queue, read here
https://docs.microsoft.com/azure/data-explorer/kusto/api/netfx/about-kusto-ingest#ingest-client-flavors
about Kusto queued ingestion
|
void |
setQueuingPolicyFactor(double factor)
setQueuingPolicyFactor
|
getIngestionTraceAttributes, ingestFromBlob, ingestFromBlobAsync, ingestFromFile, ingestFromFileAsync, ingestFromResultSet, ingestFromResultSetAsync, ingestFromStream, ingestFromStreamAsyncclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitingestFromBlob, ingestFromBlobAsync, ingestFromFile, ingestFromFileAsync, ingestFromResultSet, ingestFromResultSetAsync, ingestFromStream, ingestFromStreamAsyncpublic static final int RETRY_COUNT
public static final String CLASS_NAME
public ManagedStreamingIngestClient(ConnectionStringBuilder ingestionEndpointConnectionStringBuilder, ConnectionStringBuilder queryEndpointConnectionStringBuilder) throws URISyntaxException
IngestClientFactory.createManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder)
instead.ingestionEndpointConnectionStringBuilder - - Endpoint for ingesting data, usually starts with "https://ingest-"queryEndpointConnectionStringBuilder - - Endpoint for querying data, does not include "ingest-"URISyntaxException - if the connection string is invalidpublic ManagedStreamingIngestClient(ConnectionStringBuilder ingestionEndpointConnectionStringBuilder, ConnectionStringBuilder queryEndpointConnectionStringBuilder, boolean autoCorrectEndpoint) throws URISyntaxException
ingestionEndpointConnectionStringBuilder - - Endpoint for ingesting data, usually starts with "https://ingest-"queryEndpointConnectionStringBuilder - - Endpoint for querying data, does not include "ingest-"autoCorrectEndpoint - - Flag to indicate whether to correct the endpoint URI or notURISyntaxException - if the connection string is invalidpublic ManagedStreamingIngestClient(ConnectionStringBuilder ingestionEndpointConnectionStringBuilder, ConnectionStringBuilder queryEndpointConnectionStringBuilder, @Nullable @Nullable HttpClientProperties properties, boolean autoCorrectEndpoint) throws URISyntaxException
IngestClientFactory.createManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder, HttpClientProperties) instead.
This constructor should only be used for advanced cases. If your endpoints are standard, or you do not know, use
ManagedStreamingIngestClient(ConnectionStringBuilder, HttpClientProperties))} instead.ingestionEndpointConnectionStringBuilder - - Endpoint for ingesting data, usually starts with "https://ingest-"queryEndpointConnectionStringBuilder - - Endpoint for querying data, does not include "ingest-"properties - - Additional properties to configure the http clientURISyntaxException - if the connection string is invalidpublic ManagedStreamingIngestClient(ConnectionStringBuilder connectionStringBuilder, @Nullable @Nullable HttpClientProperties properties, boolean autoCorrectEndpoint) throws URISyntaxException
connectionStringBuilder - - Client connection stringproperties - - Additional properties to configure the http clientautoCorrectEndpoint - - Flag to indicate whether to correct the endpoint URI or notURISyntaxException - if the connection string is invalidpublic ManagedStreamingIngestClient(ConnectionStringBuilder connectionStringBuilder, @Nullable @Nullable com.azure.core.http.HttpClient httpClient, boolean autoCorrectEndpoint) throws URISyntaxException
connectionStringBuilder - - Client connection stringhttpClient - - HTTP clientautoCorrectEndpoint - - Flag to indicate whether to correct the endpoint URI or notURISyntaxException - if the connection string is invalidpublic ManagedStreamingIngestClient(ConnectionStringBuilder ingestionEndpointConnectionStringBuilder, ConnectionStringBuilder queryEndpointConnectionStringBuilder, @Nullable @Nullable HttpClientProperties properties) throws URISyntaxException
ingestionEndpointConnectionStringBuilder - - Endpoint for ingesting data, usually starts with "https://ingest-"queryEndpointConnectionStringBuilder - - Endpoint for querying data, does not include "ingest-"properties - - Additional properties to configure the http clientURISyntaxException - if the connection string is invalidpublic ManagedStreamingIngestClient(ConnectionStringBuilder connectionStringBuilder, @Nullable @Nullable HttpClientProperties properties) throws URISyntaxException
connectionStringBuilder - - Client connection stringproperties - - Additional properties to configure the http clientURISyntaxException - if the connection string is invalidpublic ManagedStreamingIngestClient(ConnectionStringBuilder connectionStringBuilder, @Nullable @Nullable com.azure.core.http.HttpClient httpClient) throws URISyntaxException
connectionStringBuilder - - Client connection stringhttpClient - - HTTP clientURISyntaxException - if the connection string is invalidpublic ManagedStreamingIngestClient(com.microsoft.azure.kusto.ingest.ResourceManager resourceManager,
AzureStorageClient storageClient,
StreamingClient streamingClient)
IngestClientFactory.createManagedStreamingIngestClient(ConnectionStringBuilder) instead.resourceManager - ingestion resources managerstorageClient - - storage utilitiesstreamingClient - - the streaming clientpublic ManagedStreamingIngestClient(com.microsoft.azure.kusto.ingest.ResourceManager resourceManager,
AzureStorageClient storageClient,
StreamingClient streamingClient,
ExponentialRetry retryTemplate)
resourceManager - ingestion resources managerstorageClient - - storage utilitiesstreamingClient - - the streaming clientretryTemplate - - retry templatepublic static ManagedStreamingIngestClient fromDmConnectionString(ConnectionStringBuilder dmConnectionString) throws URISyntaxException
ManagedStreamingIngestClient(ConnectionStringBuilder, HttpClientProperties) instead.
Creates a new ManagedStreamingIngestClient from a DM connection string, with default http client properties.
This method infers the engine connection string from the DM connection string.
For advanced usage, use ManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder)dmConnectionString - dm connection stringURISyntaxException - if the connection string is invalidpublic static ManagedStreamingIngestClient fromDmConnectionString(ConnectionStringBuilder dmConnectionString, @Nullable @Nullable HttpClientProperties properties) throws URISyntaxException
ManagedStreamingIngestClient(ConnectionStringBuilder, HttpClientProperties) instead.
Creates a new ManagedStreamingIngestClient from a DM connection string.
This method infers the engine connection string from the DM connection string.
For advanced usage, use ManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder)dmConnectionString - dm connection stringproperties - additional properties to configure the http clientURISyntaxException - if the connection string is invalidpublic static ManagedStreamingIngestClient fromEngineConnectionString(ConnectionStringBuilder engineConnectionString) throws URISyntaxException
ManagedStreamingIngestClient(ConnectionStringBuilder, HttpClientProperties) instead.
Creates a new ManagedStreamingIngestClient from an engine connection string, with default http client properties.
This method infers the DM connection string from the engine connection string.
For advanced usage, use ManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder)engineConnectionString - engine connection stringURISyntaxException - if the connection string is invalidpublic static ManagedStreamingIngestClient fromEngineConnectionString(ConnectionStringBuilder engineConnectionString, @Nullable @Nullable HttpClientProperties properties) throws URISyntaxException
ManagedStreamingIngestClient(ConnectionStringBuilder, HttpClientProperties) instead.
Creates a new ManagedStreamingIngestClient from an engine connection string.
This method infers the DM connection string from the engine connection string.
For advanced usage, use ManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder)engineConnectionString - engine connection stringproperties - additional properties to configure the http clientURISyntaxException - if the connection string is invalidprotected reactor.core.publisher.Mono<IngestionResult> ingestFromFileAsyncImpl(FileSourceInfo fileSourceInfo, IngestionProperties ingestionProperties)
ingestFromFileAsyncImpl in class IngestClientBaseprotected reactor.core.publisher.Mono<IngestionResult> ingestFromBlobAsyncImpl(BlobSourceInfo blobSourceInfo, IngestionProperties ingestionProperties)
ingestFromBlobAsyncImpl in class IngestClientBaseprotected reactor.core.publisher.Mono<IngestionResult> ingestFromResultSetAsyncImpl(ResultSetSourceInfo resultSetSourceInfo, IngestionProperties ingestionProperties)
ingestFromResultSetAsyncImpl in class IngestClientBaseprotected reactor.core.publisher.Mono<IngestionResult> ingestFromStreamAsyncImpl(StreamSourceInfo streamSourceInfo, IngestionProperties ingestionProperties)
ingestFromStreamAsyncImpl in class IngestClientBasepublic void setQueuingPolicyFactor(double factor)
setQueuingPolicyFactor
A factor used to tune the policy that handles the logic over which data size would the client choose to directly use queued ingestion instead of trying streaming ingestion first. Setting the factor will create a newManagedStreamingQueuingPolicy with this factor, which will be used
in the future ingestion calls.factor - - Default is 1.protected String getClientType()
getClientType in class IngestClientBasepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void setQueueRequestOptions(com.azure.storage.common.policy.RequestRetryOptions queueRequestOptions)
QueuedIngestClientsetQueueRequestOptions in interface QueuedIngestClientqueueRequestOptions - - Options to use when creating QueueClientpublic IngestionResourceManager getResourceManager()
getResourceManager in interface QueuedIngestClientCopyright © 2025. All rights reserved.