azure-docs-sdk-java/docs-ref-autogen/com.azure.messaging.eventhu...

366 строки
56 KiB
YAML

### YamlMime:JavaType
uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder"
name: "EventHubBufferedProducerClientBuilder"
nameWithType: "EventHubBufferedProducerClientBuilder"
summary: "Builder used to instantiate <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClient\"></xref> and <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerAsyncClient\"></xref>."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
methodsRef:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
syntax: "public final class **EventHubBufferedProducerClientBuilder**</br> implements <xref href=\"com.azure.core.client.traits.TokenCredentialTrait?alt=com.azure.core.client.traits.TokenCredentialTrait&text=TokenCredentialTrait\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />&gt;, <xref href=\"com.azure.core.client.traits.AzureNamedKeyCredentialTrait?alt=com.azure.core.client.traits.AzureNamedKeyCredentialTrait&text=AzureNamedKeyCredentialTrait\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />&gt;, <xref href=\"com.azure.core.client.traits.ConnectionStringTrait?alt=com.azure.core.client.traits.ConnectionStringTrait&text=ConnectionStringTrait\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />&gt;, <xref href=\"com.azure.core.client.traits.AzureSasCredentialTrait?alt=com.azure.core.client.traits.AzureSasCredentialTrait&text=AzureSasCredentialTrait\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />&gt;, <xref href=\"com.azure.core.amqp.client.traits.AmqpTrait?alt=com.azure.core.amqp.client.traits.AmqpTrait&text=AmqpTrait\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />&gt;, <xref href=\"com.azure.core.client.traits.ConfigurationTrait?alt=com.azure.core.client.traits.ConfigurationTrait&text=ConfigurationTrait\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />&gt;"
constructors:
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.EventHubBufferedProducerClientBuilder()"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.EventHubBufferedProducerClientBuilder()"
name: "EventHubBufferedProducerClientBuilder()"
nameWithType: "EventHubBufferedProducerClientBuilder.EventHubBufferedProducerClientBuilder()"
summary: "Creates a new instance with the following defaults:\n\n * <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.maxEventBufferLengthPerPartition(int)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#maxEventBufferLengthPerPartition(int)\"></xref> is 1500\n * <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.transportType(com.azure.core.amqp.AmqpTransportType)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#transportType(AmqpTransportType)\"></xref> is <xref uid=\"com.azure.core.amqp.AmqpTransportType.AMQP\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AmqpTransportType#AMQP\"></xref>\n * <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.maxConcurrentSendsPerPartition*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#maxConcurrentSendsPerPartition(int)\"></xref> is 1\n * <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.maxConcurrentSends*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#maxConcurrentSends(int)\"></xref> is 1\n * <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.maxWaitTime(java.time.Duration)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#maxWaitTime(Duration)\"></xref> is 30 seconds"
syntax: "public EventHubBufferedProducerClientBuilder()"
desc: "Creates a new instance with the following defaults:\n\n * <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.maxEventBufferLengthPerPartition(int)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#maxEventBufferLengthPerPartition(int)\"></xref> is 1500\n * <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.transportType(com.azure.core.amqp.AmqpTransportType)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#transportType(AmqpTransportType)\"></xref> is <xref uid=\"com.azure.core.amqp.AmqpTransportType.AMQP\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AmqpTransportType#AMQP\"></xref>\n * <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.maxConcurrentSendsPerPartition*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#maxConcurrentSendsPerPartition(int)\"></xref> is 1\n * <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.maxConcurrentSends*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#maxConcurrentSends(int)\"></xref> is 1\n * <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.maxWaitTime(java.time.Duration)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#maxWaitTime(Duration)\"></xref> is 30 seconds"
methods:
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.buildAsyncClient()"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.buildAsyncClient()"
name: "buildAsyncClient()"
nameWithType: "EventHubBufferedProducerClientBuilder.buildAsyncClient()"
summary: "Builds a new instance of the async buffered producer client."
syntax: "public EventHubBufferedProducerAsyncClient buildAsyncClient()"
desc: "Builds a new instance of the async buffered producer client."
returns:
description: "A new instance of <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerAsyncClient\"></xref>."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerAsyncClient?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerAsyncClient&text=EventHubBufferedProducerAsyncClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.buildClient()"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.buildClient()"
name: "buildClient()"
nameWithType: "EventHubBufferedProducerClientBuilder.buildClient()"
summary: "Builds a new instance of the buffered producer client."
syntax: "public EventHubBufferedProducerClient buildClient()"
desc: "Builds a new instance of the buffered producer client."
returns:
description: "A new instance of <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClient\"></xref>."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClient?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClient&text=EventHubBufferedProducerClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.clientOptions(com.azure.core.util.ClientOptions)"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.clientOptions(ClientOptions clientOptions)"
name: "clientOptions(ClientOptions clientOptions)"
nameWithType: "EventHubBufferedProducerClientBuilder.clientOptions(ClientOptions clientOptions)"
summary: "Sets the client options."
parameters:
- description: "The client options."
name: "clientOptions"
type: "<xref href=\"com.azure.core.util.ClientOptions?alt=com.azure.core.util.ClientOptions&text=ClientOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public EventHubBufferedProducerClientBuilder clientOptions(ClientOptions clientOptions)"
desc: "Sets the client options."
returns:
description: "The updated <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.configuration(com.azure.core.util.Configuration)"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.configuration(Configuration configuration)"
name: "configuration(Configuration configuration)"
nameWithType: "EventHubBufferedProducerClientBuilder.configuration(Configuration configuration)"
summary: "Sets the configuration store that is used during construction of the service client."
parameters:
- description: "The configuration store used to configure the buffered producer."
name: "configuration"
type: "<xref href=\"com.azure.core.util.Configuration?alt=com.azure.core.util.Configuration&text=Configuration\" data-throw-if-not-resolved=\"False\" />"
syntax: "public EventHubBufferedProducerClientBuilder configuration(Configuration configuration)"
desc: "Sets the configuration store that is used during construction of the service client. If not specified, the default configuration store is used to configure the buffered producer. Use <xref uid=\"com.azure.core.util.Configuration.NONE\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Configuration#NONE\"></xref> to bypass using configuration settings during construction."
returns:
description: "The updated <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.connectionString(java.lang.String)"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.connectionString(String connectionString)"
name: "connectionString(String connectionString)"
nameWithType: "EventHubBufferedProducerClientBuilder.connectionString(String connectionString)"
summary: "Sets the credential information given a connection string to the Event Hub instance."
parameters:
- description: "The connection string to use for connecting to the Event Hub instance. It is expected\n that the Event Hub name and the shared access key properties are contained in this connection string."
name: "connectionString"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public EventHubBufferedProducerClientBuilder connectionString(String connectionString)"
desc: "Sets the credential information given a connection string to the Event Hub instance.\n\nIf the connection string is copied from the Event Hubs namespace, it will likely not contain the name to the desired Event Hub, which is needed. In this case, the name can be added manually by adding \"EntityPath=EVENT\\_HUB\\_NAME\" to the end of the connection string. For example, \"EntityPath=telemetry-hub\".\n\nIf you have defined a shared access policy directly on the Event Hub itself, then copying the connection string from that Event Hub will result in a connection string that contains the name."
returns:
description: "The updated <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.connectionString(java.lang.String,java.lang.String)"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.connectionString(String connectionString, String eventHubName)"
name: "connectionString(String connectionString, String eventHubName)"
nameWithType: "EventHubBufferedProducerClientBuilder.connectionString(String connectionString, String eventHubName)"
summary: "Sets the credential information given a connection string to the Event Hubs namespace and name to a specific Event Hub instance."
parameters:
- description: "The connection string to use for connecting to the Event Hubs namespace; it is\n expected that the shared access key properties are contained in this connection string, but not the Event Hub\n name."
name: "connectionString"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The name of the Event Hub to connect the client to."
name: "eventHubName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public EventHubBufferedProducerClientBuilder connectionString(String connectionString, String eventHubName)"
desc: "Sets the credential information given a connection string to the Event Hubs namespace and name to a specific Event Hub instance."
returns:
description: "The updated <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.credential(com.azure.core.credential.AzureNamedKeyCredential)"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.credential(AzureNamedKeyCredential credential)"
name: "credential(AzureNamedKeyCredential credential)"
nameWithType: "EventHubBufferedProducerClientBuilder.credential(AzureNamedKeyCredential credential)"
summary: "Sets the credential information for which Event Hub instance to connect to, and how to authorize against it."
parameters:
- description: "The shared access name and key credential to use for authorization.\n Access controls may be specified by the Event Hubs namespace or the requested Event Hub,\n depending on Azure configuration."
name: "credential"
type: "<xref href=\"com.azure.core.credential.AzureNamedKeyCredential?alt=com.azure.core.credential.AzureNamedKeyCredential&text=AzureNamedKeyCredential\" data-throw-if-not-resolved=\"False\" />"
syntax: "public EventHubBufferedProducerClientBuilder credential(AzureNamedKeyCredential credential)"
desc: "Sets the credential information for which Event Hub instance to connect to, and how to authorize against it."
returns:
description: "The updated <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.credential(com.azure.core.credential.AzureSasCredential)"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.credential(AzureSasCredential credential)"
name: "credential(AzureSasCredential credential)"
nameWithType: "EventHubBufferedProducerClientBuilder.credential(AzureSasCredential credential)"
summary: "Sets the credential information for which Event Hub instance to connect to, and how to authorize against it."
parameters:
- description: "The shared access signature credential to use for authorization.\n Access controls may be specified by the Event Hubs namespace or the requested Event Hub,\n depending on Azure configuration."
name: "credential"
type: "<xref href=\"com.azure.core.credential.AzureSasCredential?alt=com.azure.core.credential.AzureSasCredential&text=AzureSasCredential\" data-throw-if-not-resolved=\"False\" />"
syntax: "public EventHubBufferedProducerClientBuilder credential(AzureSasCredential credential)"
desc: "Sets the credential information for which Event Hub instance to connect to, and how to authorize against it."
returns:
description: "The updated <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.credential(com.azure.core.credential.TokenCredential)"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.credential(TokenCredential credential)"
name: "credential(TokenCredential credential)"
nameWithType: "EventHubBufferedProducerClientBuilder.credential(TokenCredential credential)"
summary: "Sets the <xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TokenCredential\"></xref> used to authorize requests sent to the service."
parameters:
- description: "The token credential to use for authorization. Access controls may be specified by the\n Event Hubs namespace or the requested Event Hub, depending on Azure configuration."
name: "credential"
type: "<xref href=\"com.azure.core.credential.TokenCredential?alt=com.azure.core.credential.TokenCredential&text=TokenCredential\" data-throw-if-not-resolved=\"False\" />"
syntax: "public EventHubBufferedProducerClientBuilder credential(TokenCredential credential)"
desc: "Sets the <xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TokenCredential\"></xref> used to authorize requests sent to the service. Refer to the Azure SDK for Java [identity and authentication][] documentation for more details on proper usage of the <xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TokenCredential\"></xref> type.\n\n\n[identity and authentication]: https://aka.ms/azsdk/java/docs/identity"
returns:
description: "The updated <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.credential(java.lang.String,java.lang.String,com.azure.core.credential.AzureNamedKeyCredential)"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.credential(String fullyQualifiedNamespace, String eventHubName, AzureNamedKeyCredential credential)"
name: "credential(String fullyQualifiedNamespace, String eventHubName, AzureNamedKeyCredential credential)"
nameWithType: "EventHubBufferedProducerClientBuilder.credential(String fullyQualifiedNamespace, String eventHubName, AzureNamedKeyCredential credential)"
summary: "Sets the <xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TokenCredential\"></xref> used to authorize requests sent to the service."
parameters:
- description: "The fully qualified name for the Event Hubs namespace. This is likely to be\n similar to <strong>\"{your-namespace}.servicebus.windows.net\"</strong>."
name: "fullyQualifiedNamespace"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The name of the Event Hub to connect the client to."
name: "eventHubName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The token credential to use for authorization. Access controls may be specified by the\n Event Hubs namespace or the requested Event Hub, depending on Azure configuration."
name: "credential"
type: "<xref href=\"com.azure.core.credential.AzureNamedKeyCredential?alt=com.azure.core.credential.AzureNamedKeyCredential&text=AzureNamedKeyCredential\" data-throw-if-not-resolved=\"False\" />"
syntax: "public EventHubBufferedProducerClientBuilder credential(String fullyQualifiedNamespace, String eventHubName, AzureNamedKeyCredential credential)"
desc: "Sets the <xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TokenCredential\"></xref> used to authorize requests sent to the service. Refer to the Azure SDK for Java [identity and authentication][] documentation for more details on proper usage of the <xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TokenCredential\"></xref> type.\n\n\n[identity and authentication]: https://aka.ms/azsdk/java/docs/identity"
returns:
description: "The updated <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.credential(java.lang.String,java.lang.String,com.azure.core.credential.AzureSasCredential)"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.credential(String fullyQualifiedNamespace, String eventHubName, AzureSasCredential credential)"
name: "credential(String fullyQualifiedNamespace, String eventHubName, AzureSasCredential credential)"
nameWithType: "EventHubBufferedProducerClientBuilder.credential(String fullyQualifiedNamespace, String eventHubName, AzureSasCredential credential)"
summary: "Sets the <xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TokenCredential\"></xref> used to authorize requests sent to the service."
parameters:
- description: "The fully qualified name for the Event Hubs namespace. This is likely to be\n similar to <strong>\"{your-namespace}.servicebus.windows.net\"</strong>."
name: "fullyQualifiedNamespace"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The name of the Event Hub to connect the client to."
name: "eventHubName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The token credential to use for authorization. Access controls may be specified by the\n Event Hubs namespace or the requested Event Hub, depending on Azure configuration."
name: "credential"
type: "<xref href=\"com.azure.core.credential.AzureSasCredential?alt=com.azure.core.credential.AzureSasCredential&text=AzureSasCredential\" data-throw-if-not-resolved=\"False\" />"
syntax: "public EventHubBufferedProducerClientBuilder credential(String fullyQualifiedNamespace, String eventHubName, AzureSasCredential credential)"
desc: "Sets the <xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TokenCredential\"></xref> used to authorize requests sent to the service. Refer to the Azure SDK for Java [identity and authentication][] documentation for more details on proper usage of the <xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TokenCredential\"></xref> type.\n\n\n[identity and authentication]: https://aka.ms/azsdk/java/docs/identity"
returns:
description: "The updated <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.credential(java.lang.String,java.lang.String,com.azure.core.credential.TokenCredential)"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.credential(String fullyQualifiedNamespace, String eventHubName, TokenCredential credential)"
name: "credential(String fullyQualifiedNamespace, String eventHubName, TokenCredential credential)"
nameWithType: "EventHubBufferedProducerClientBuilder.credential(String fullyQualifiedNamespace, String eventHubName, TokenCredential credential)"
summary: "Sets the credential information for which Event Hub instance to connect to, and how to authorize against it."
parameters:
- description: "The fully qualified name for the Event Hubs namespace. This is likely to be\n similar to <strong>\"{your-namespace}.servicebus.windows.net\"</strong>."
name: "fullyQualifiedNamespace"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The name of the Event Hub to connect the client to."
name: "eventHubName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The token credential to use for authorization. Access controls may be specified by the\n Event Hubs namespace or the requested Event Hub, depending on Azure configuration."
name: "credential"
type: "<xref href=\"com.azure.core.credential.TokenCredential?alt=com.azure.core.credential.TokenCredential&text=TokenCredential\" data-throw-if-not-resolved=\"False\" />"
syntax: "public EventHubBufferedProducerClientBuilder credential(String fullyQualifiedNamespace, String eventHubName, TokenCredential credential)"
desc: "Sets the credential information for which Event Hub instance to connect to, and how to authorize against it."
returns:
description: "The updated <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.customEndpointAddress(java.lang.String)"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.customEndpointAddress(String customEndpointAddress)"
name: "customEndpointAddress(String customEndpointAddress)"
nameWithType: "EventHubBufferedProducerClientBuilder.customEndpointAddress(String customEndpointAddress)"
summary: "Sets a custom endpoint address when connecting to the Event Hubs service."
parameters:
- description: "The custom endpoint address."
name: "customEndpointAddress"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public EventHubBufferedProducerClientBuilder customEndpointAddress(String customEndpointAddress)"
desc: "Sets a custom endpoint address when connecting to the Event Hubs service. This can be useful when your network does not allow connecting to the standard Azure Event Hubs endpoint address, but does allow connecting through an intermediary. For example: https://my.custom.endpoint.com:55300.\n\nIf no port is specified, the default port for the <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.transportType(com.azure.core.amqp.AmqpTransportType)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"transport type\"></xref> is used."
returns:
description: "The updated <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.eventHubName(java.lang.String)"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.eventHubName(String eventHubName)"
name: "eventHubName(String eventHubName)"
nameWithType: "EventHubBufferedProducerClientBuilder.eventHubName(String eventHubName)"
summary: "Sets the name of the Event Hub to connect the client to."
parameters:
- description: "The name of the Event Hub to connect the client to."
name: "eventHubName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public EventHubBufferedProducerClientBuilder eventHubName(String eventHubName)"
desc: "Sets the name of the Event Hub to connect the client to."
returns:
description: "The updated object."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.fullyQualifiedNamespace(java.lang.String)"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.fullyQualifiedNamespace(String fullyQualifiedNamespace)"
name: "fullyQualifiedNamespace(String fullyQualifiedNamespace)"
nameWithType: "EventHubBufferedProducerClientBuilder.fullyQualifiedNamespace(String fullyQualifiedNamespace)"
summary: "Sets the fully qualified name for the Event Hubs namespace."
parameters:
- description: "The fully qualified name for the Event Hubs namespace. This is likely to be\n similar to <strong>\"{your-namespace}.servicebus.windows.net\"</strong>."
name: "fullyQualifiedNamespace"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public EventHubBufferedProducerClientBuilder fullyQualifiedNamespace(String fullyQualifiedNamespace)"
desc: "Sets the fully qualified name for the Event Hubs namespace."
returns:
description: "The updated object."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.maxEventBufferLengthPerPartition(int)"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.maxEventBufferLengthPerPartition(int maxEventBufferLengthPerPartition)"
name: "maxEventBufferLengthPerPartition(int maxEventBufferLengthPerPartition)"
nameWithType: "EventHubBufferedProducerClientBuilder.maxEventBufferLengthPerPartition(int maxEventBufferLengthPerPartition)"
summary: "The total number of events that can be buffered for publishing at a given time for a given partition."
parameters:
- description: "Total number of events that can be buffered for publishing at a given\n time."
name: "maxEventBufferLengthPerPartition"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
syntax: "public EventHubBufferedProducerClientBuilder maxEventBufferLengthPerPartition(int maxEventBufferLengthPerPartition)"
desc: "The total number of events that can be buffered for publishing at a given time for a given partition. Once this capacity is reached, more events can enqueued by calling the `enqueueEvent` methods on either <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClient\"></xref> or <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerAsyncClient\"></xref>. The default limit is 1500 queued events for each partition."
returns:
description: "The updated <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.maxWaitTime(java.time.Duration)"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.maxWaitTime(Duration maxWaitTime)"
name: "maxWaitTime(Duration maxWaitTime)"
nameWithType: "EventHubBufferedProducerClientBuilder.maxWaitTime(Duration maxWaitTime)"
summary: "The amount of time to wait for a batch to be built with events in the buffer before publishing a partially full batch."
parameters:
- description: "The amount of time to wait."
name: "maxWaitTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
syntax: "public EventHubBufferedProducerClientBuilder maxWaitTime(Duration maxWaitTime)"
desc: "The amount of time to wait for a batch to be built with events in the buffer before publishing a partially full batch."
returns:
description: "The updated <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.onSendBatchFailed(java.util.function.Consumer<com.azure.messaging.eventhubs.models.SendBatchFailedContext>)"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.onSendBatchFailed(Consumer<SendBatchFailedContext> sendFailedContext)"
name: "onSendBatchFailed(Consumer<SendBatchFailedContext> sendFailedContext)"
nameWithType: "EventHubBufferedProducerClientBuilder.onSendBatchFailed(Consumer<SendBatchFailedContext> sendFailedContext)"
summary: "The callback to invoke when publishing a set of events fails."
parameters:
- description: "The callback to invoke."
name: "sendFailedContext"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html\">Consumer</a>&lt;<xref href=\"com.azure.messaging.eventhubs.models.SendBatchFailedContext?alt=com.azure.messaging.eventhubs.models.SendBatchFailedContext&text=SendBatchFailedContext\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "public EventHubBufferedProducerClientBuilder onSendBatchFailed(Consumer<SendBatchFailedContext> sendFailedContext)"
desc: "The callback to invoke when publishing a set of events fails."
returns:
description: "The updated <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.onSendBatchSucceeded(java.util.function.Consumer<com.azure.messaging.eventhubs.models.SendBatchSucceededContext>)"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.onSendBatchSucceeded(Consumer<SendBatchSucceededContext> sendSucceededContext)"
name: "onSendBatchSucceeded(Consumer<SendBatchSucceededContext> sendSucceededContext)"
nameWithType: "EventHubBufferedProducerClientBuilder.onSendBatchSucceeded(Consumer<SendBatchSucceededContext> sendSucceededContext)"
summary: "The callback to invoke when publishing a set of events succeeds."
parameters:
- description: "The callback to invoke when publishing a ste of events succeeds."
name: "sendSucceededContext"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html\">Consumer</a>&lt;<xref href=\"com.azure.messaging.eventhubs.models.SendBatchSucceededContext?alt=com.azure.messaging.eventhubs.models.SendBatchSucceededContext&text=SendBatchSucceededContext\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "public EventHubBufferedProducerClientBuilder onSendBatchSucceeded(Consumer<SendBatchSucceededContext> sendSucceededContext)"
desc: "The callback to invoke when publishing a set of events succeeds."
returns:
description: "The updated <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.proxyOptions(com.azure.core.amqp.ProxyOptions)"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.proxyOptions(ProxyOptions proxyOptions)"
name: "proxyOptions(ProxyOptions proxyOptions)"
nameWithType: "EventHubBufferedProducerClientBuilder.proxyOptions(ProxyOptions proxyOptions)"
summary: "Sets the proxy configuration to use for the buffered producer."
parameters:
- description: "The proxy configuration to use."
name: "proxyOptions"
type: "<xref href=\"com.azure.core.amqp.ProxyOptions?alt=com.azure.core.amqp.ProxyOptions&text=ProxyOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public EventHubBufferedProducerClientBuilder proxyOptions(ProxyOptions proxyOptions)"
desc: "Sets the proxy configuration to use for the buffered producer. When a proxy is configured, <xref uid=\"com.azure.core.amqp.AmqpTransportType.AMQP_WEB_SOCKETS\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AmqpTransportType#AMQP_WEB_SOCKETS\"></xref> must be used for the transport type."
returns:
description: "The updated <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.retryOptions(com.azure.core.amqp.AmqpRetryOptions)"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.retryOptions(AmqpRetryOptions retryOptions)"
name: "retryOptions(AmqpRetryOptions retryOptions)"
nameWithType: "EventHubBufferedProducerClientBuilder.retryOptions(AmqpRetryOptions retryOptions)"
summary: "Sets the retry policy for the producer client."
parameters:
- description: "The retry policy to use."
name: "retryOptions"
type: "<xref href=\"com.azure.core.amqp.AmqpRetryOptions?alt=com.azure.core.amqp.AmqpRetryOptions&text=AmqpRetryOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public EventHubBufferedProducerClientBuilder retryOptions(AmqpRetryOptions retryOptions)"
desc: "Sets the retry policy for the producer client. If not specified, the default retry options are used."
returns:
description: "The updated <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.transportType(com.azure.core.amqp.AmqpTransportType)"
fullName: "com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.transportType(AmqpTransportType transport)"
name: "transportType(AmqpTransportType transport)"
nameWithType: "EventHubBufferedProducerClientBuilder.transportType(AmqpTransportType transport)"
summary: "Sets the transport type by which all the communication with Azure Event Hubs occurs."
parameters:
- description: "The transport type to use."
name: "transport"
type: "<xref href=\"com.azure.core.amqp.AmqpTransportType?alt=com.azure.core.amqp.AmqpTransportType&text=AmqpTransportType\" data-throw-if-not-resolved=\"False\" />"
syntax: "public EventHubBufferedProducerClientBuilder transportType(AmqpTransportType transport)"
desc: "Sets the transport type by which all the communication with Azure Event Hubs occurs. Default value is <xref uid=\"com.azure.core.amqp.AmqpTransportType.AMQP\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AmqpTransportType#AMQP\"></xref>."
returns:
description: "The updated <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />"
type: "class"
desc: "Builder used to instantiate <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClient\"></xref> and <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerAsyncClient\"></xref>.\n\nTo create an instance of <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClient\"></xref> or <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerAsyncClient\"></xref>, the **following fields are required**:\n\n * <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.onSendBatchSucceeded(java.util.function.Consumer<com.azure.messaging.eventhubs.models.SendBatchSucceededContext>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#onSendBatchSucceeded(Consumer)\"></xref> \\- A callback when events are successfully published to Event Hubs.\n * <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.onSendBatchFailed(java.util.function.Consumer<com.azure.messaging.eventhubs.models.SendBatchFailedContext>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#onSendBatchFailed(Consumer)\"></xref> \\- A callback when a failure publishing to Event Hubs occurs.\n * Credentials to perform operations against Azure Event Hubs. They can be set by using one of the following methods:\n \n * <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.credential(java.lang.String,java.lang.String,com.azure.core.credential.TokenCredential)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"credential(String, String, TokenCredential)\"></xref> with the fully qualified namespace, Event Hub name, and a set of credentials authorized to use the Event Hub.\n * <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.credential(com.azure.core.credential.TokenCredential)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#credential(TokenCredential)\"></xref>, <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.credential(com.azure.core.credential.AzureSasCredential)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#credential(AzureSasCredential)\"></xref>, or <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.credential(com.azure.core.credential.AzureNamedKeyCredential)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#credential(AzureNamedKeyCredential)\"></xref> along with <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.fullyQualifiedNamespace(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#fullyQualifiedNamespace(String)\"></xref> and <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.eventHubName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#eventHubName(String)\"></xref>. The fully qualified namespace, Event Hub name, and authorized credentials to use the Event Hub.\n * <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.connectionString(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"connectionString(String)\"></xref> with a connection string to a specific Event Hub.\n * <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder.connectionString(java.lang.String,java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"connectionString(String, String)\"></xref> with an Event Hub *namespace* connection string and the Event Hub name.\n\nThe credential used in the following samples is `DefaultAzureCredential` for authentication. It is appropriate for most scenarios, including local development and production environments. Additionally, we recommend using [managed identity][] for authentication in production environments. You can find more information on different ways of authenticating and their corresponding credential types in the [Azure Identity documentation\"][Azure Identity documentation].\n\n**Sample: Creating an <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerAsyncClient\"></xref>**\n\nThe following code sample demonstrates the creation of the asynchronous client <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerAsyncClient\"></xref>. The `fullyQualifiedNamespace` is the Event Hubs Namespace's host name. It is listed under the \"Essentials\" panel after navigating to the Event Hubs Namespace via Azure Portal. The credential used is `DefaultAzureCredential` because it combines commonly used credentials in deployment and development and chooses the credential to used based on its running environment. The producer is set to publish events every 60 seconds with a buffer size of 1500 events for each partition.\n\n```java\nTokenCredential credential = new DefaultAzureCredentialBuilder().build();\n\n // \"<<fully-qualified-namespace>>\" will look similar to \"{your-namespace}.servicebus.windows.net\"\n // \"<<event-hub-name>>\" will be the name of the Event Hub instance you created inside the Event Hubs namespace.\n EventHubBufferedProducerAsyncClient client = new EventHubBufferedProducerClientBuilder()\n .credential(\"fully-qualified-namespace\", \"event-hub-name\", credential)\n .onSendBatchSucceeded(succeededContext -> {\n System.out.println(\"Successfully published events to: \" + succeededContext.getPartitionId());\n })\n .onSendBatchFailed(failedContext -> {\n System.out.printf(\"Failed to published events to %s. Error: %s%n\",\n failedContext.getPartitionId(), failedContext.getThrowable());\n })\n .maxWaitTime(Duration.ofSeconds(60))\n .maxEventBufferLengthPerPartition(1500)\n .buildAsyncClient();\n```\n\n**Sample: Creating an <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClient\"></xref>**\n\nThe following code sample demonstrates the creation of the synchronous client <xref uid=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubBufferedProducerClient\"></xref>. The `fullyQualifiedNamespace` is the Event Hubs Namespace's host name. It is listed under the \"Essentials\" panel after navigating to the Event Hubs Namespace via Azure Portal. The credential used is `DefaultAzureCredential` because it combines commonly used credentials in deployment and development and chooses the credential to used based on its running environment. The producer is set to publish events every 60 seconds with a buffer size of 1500 events for each partition.\n\n```java\nTokenCredential credential = new DefaultAzureCredentialBuilder().build();\n\n // \"<<fully-qualified-namespace>>\" will look similar to \"{your-namespace}.servicebus.windows.net\"\n // \"<<event-hub-name>>\" will be the name of the Event Hub instance you created inside the Event Hubs namespace.\n EventHubBufferedProducerClient client = new EventHubBufferedProducerClientBuilder()\n .credential(\"fully-qualified-namespace\", \"event-hub-name\", credential)\n .onSendBatchSucceeded(succeededContext -> {\n System.out.println(\"Successfully published events to: \" + succeededContext.getPartitionId());\n })\n .onSendBatchFailed(failedContext -> {\n System.out.printf(\"Failed to published events to %s. Error: %s%n\",\n failedContext.getPartitionId(), failedContext.getThrowable());\n })\n .buildClient();\n```\n\n\n[managed identity]: https://learn.microsoft.com/azure/active-directory/managed-identities-azure-resources/\n[Azure Identity documentation]: https://learn.microsoft.com/java/api/overview/azure/identity-readme"
implements:
- "<xref href=\"com.azure.core.amqp.client.traits.AmqpTrait?alt=com.azure.core.amqp.client.traits.AmqpTrait&text=AmqpTrait\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />&gt;"
- "<xref href=\"com.azure.core.client.traits.AzureNamedKeyCredentialTrait?alt=com.azure.core.client.traits.AzureNamedKeyCredentialTrait&text=AzureNamedKeyCredentialTrait\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />&gt;"
- "<xref href=\"com.azure.core.client.traits.AzureSasCredentialTrait?alt=com.azure.core.client.traits.AzureSasCredentialTrait&text=AzureSasCredentialTrait\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />&gt;"
- "<xref href=\"com.azure.core.client.traits.ConfigurationTrait?alt=com.azure.core.client.traits.ConfigurationTrait&text=ConfigurationTrait\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />&gt;"
- "<xref href=\"com.azure.core.client.traits.ConnectionStringTrait?alt=com.azure.core.client.traits.ConnectionStringTrait&text=ConnectionStringTrait\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />&gt;"
- "<xref href=\"com.azure.core.client.traits.TokenCredentialTrait?alt=com.azure.core.client.traits.TokenCredentialTrait&text=TokenCredentialTrait\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder?alt=com.azure.messaging.eventhubs.EventHubBufferedProducerClientBuilder&text=EventHubBufferedProducerClientBuilder\" data-throw-if-not-resolved=\"False\" />&gt;"
metadata: {}
package: "com.azure.messaging.eventhubs"
artifact: com.azure:azure-messaging-eventhubs:5.18.7