Minio
Store and retrieve objects in MinIO or another Amazon S3 compatible object storage.
What’s inside
-
Minio component, URI syntax:
minio:bucketName
Please refer to the above links for usage and configuration details.
Maven coordinates
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-minio-starter</artifactId>
</dependency> Spring Boot Auto-Configuration
The starter supports 50 options, which are listed below.
| Name | Description | Default | Type |
|---|---|---|---|
camel.component.minio.access-key | The access key (user name) for the requests to the server. If accessKey or secretKey is not set, the client sends the requests without credentials. Not used when minioClient is set. | String | |
camel.component.minio.auto-close-body | Whether the consumer closes the stream that it read the content of the object from, when the exchange is done. Only used when includeBody is true. If false, the consumer does not close the stream. | true | Boolean |
camel.component.minio.auto-create-bucket | Whether to create the bucket at startup if it does not exist (skipped when objectName is set), and, for a consumer with moveAfterRead, the destinationBucketName bucket. If false, a missing destination bucket fails the start of the consumer. | true | Boolean |
camel.component.minio.autowired-enabled | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean |
camel.component.minio.bridge-error-handler | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | Boolean |
camel.component.minio.bypass-governance-mode | Whether the consumer bypasses the governance mode retention of object locking when it deletes an object with deleteAfterRead or moveAfterRead. This needs the s3:BypassGovernanceRetention permission. | false | Boolean |
camel.component.minio.configuration | The configuration that the endpoints of this component start from. The options set on an endpoint replace its values. The option is a org.apache.camel.component.minio.MinioConfiguration type. | MinioConfiguration | |
camel.component.minio.custom-http-client | To use a custom okhttp3.OkHttpClient for the requests to the server, for example to configure timeouts, a proxy or the connection pool. Not used when minioClient is set. The option is a okhttp3.OkHttpClient type. | OkHttpClient | |
camel.component.minio.delete-after-read | Whether the consumer deletes the object from the bucket after the exchange completes successfully. If false, the consumer gets the same objects again in later polls: use the Idempotent Consumer EIP to filter out duplicates, for example by the CamelMinioObjectName header. | true | Boolean |
camel.component.minio.delete-after-write | Whether the producer deletes the file after it uploaded it, when the body is a java.io.File, for example the file of a file consumer. Other bodies are not affected. | false | Boolean |
camel.component.minio.delimiter | The delimiter that the listing requests of the consumer use to group object names into folders. If not set, the listing uses /. Not used when recursive is true. | String | |
camel.component.minio.destination-bucket-name | The bucket that the consumer moves the consumed objects to, with moveAfterRead, which requires it. The producer reads the bucket of copyObject from the CamelMinioDestinationBucketName header instead. | String | |
camel.component.minio.destination-object-name | The object name that the consumer moves the consumed objects to, in destinationBucketName, with moveAfterRead. If not set, the name of the consumed object. With a fixed name, each moved object replaces the previous one. | String | |
camel.component.minio.enabled | Whether to enable auto configuration of the minio component. This is enabled by default. | Boolean | |
camel.component.minio.endpoint | The MinIO server, or other Amazon S3 compatible service, to connect to: a URL such as http://localhost:9000, or a host name or IP address, for which the client uses HTTPS on port 443. Required unless minioClient is set. | String | |
camel.component.minio.health-check-consumer-enabled | Used for enabling or disabling all consumer based health checks from this component | true | Boolean |
camel.component.minio.health-check-producer-enabled | Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer checks globally by setting camel.health.producersEnabled=true. | true | Boolean |
camel.component.minio.include-body | Whether the consumer reads the content of the object into the body, as a byte array. If false, the body is null and the headers carry the metadata of the object. | true | Boolean |
camel.component.minio.include-folders | Whether the consumer also creates an exchange for the folder entries of the listing. By default, it skips them. | false | Boolean |
camel.component.minio.include-user-metadata | Whether the listing requests of the consumer ask for the user metadata of the objects (a MinIO extension of ListObjectsV2). The consumer does not set this metadata on the message. The listing fails if useVersion1 or includeVersions is also true. | false | Boolean |
camel.component.minio.include-versions | Whether the consumer lists all versions of the objects. It still gets each listed object name once per poll, in the version that the versionId option selects, else the current version. | false | Boolean |
camel.component.minio.key-name | The name of the object that the producer uploads, gets, deletes, copies (the source of copyObject) or creates a link for. The CamelMinioObjectName header replaces it. | String | |
camel.component.minio.lazy-start-producer | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | Boolean |
camel.component.minio.length | The number of bytes of the object, from offset, that the consumer gets. With moveAfterRead, the consumer copies only these bytes. The default 0 means up to the end of the object. | Long | |
camel.component.minio.match-e-tag | The consumer gets an object only if its ETag matches this value (the If-Match condition). For an object that does not match, the request fails and the consumer reports an error. | String | |
camel.component.minio.max-connections | Not used: the component does not pass this value to the MinIO client. Configure the connection pool of the OkHttpClient of the customHttpClient option instead. | 60 | Integer |
camel.component.minio.max-messages-per-poll | The maximum number of objects that the consumer lists and consumes in one poll, which is also the page size of its listing requests. Use 0 or a negative number for no limit. Not used when objectName is set. | 10 | Integer |
camel.component.minio.minio-client | To use a custom io.minio.MinioClient. When this option is set or autowired, the endpoint, proxyPort, secure, region, accessKey, secretKey and customHttpClient options are not used. The option is a io.minio.MinioClient type. | MinioClient | |
camel.component.minio.modified-since | The consumer gets an object only if it was modified after this time (the If-Modified-Since condition). For another object, the request fails and the consumer reports an error. | ZonedDateTime | |
camel.component.minio.move-after-read | Whether the consumer copies the object to destinationBucketName after the exchange completes successfully, and then deletes it from the bucket, also when deleteAfterRead is false. | false | Boolean |
camel.component.minio.not-match-e-tag | The consumer gets an object only if its ETag does not match this value (the If-None-Match condition). For an object that matches, the request fails and the consumer reports an error. | String | |
camel.component.minio.object-lock | Whether to enable object locking on the buckets that the component creates (see autoCreateBucket). It does not change an existing bucket. | false | Boolean |
camel.component.minio.object-name | The name of the one object that the consumer gets in each poll, instead of listing the bucket. When set, the endpoint does not check or create the bucket, and does not set the policy, at startup. | String | |
camel.component.minio.offset | The position of the first byte of the object that the consumer gets. With moveAfterRead, the consumer copies only the bytes from this position. The default 0 is the start of the object. | Long | |
camel.component.minio.operation | The operation that the producer performs. If not set, the producer uploads the body as an object. The CamelMinioOperation header replaces it. | MinioOperations | |
camel.component.minio.pojo-request | Whether the body is the builder of the request of the MinIO Java SDK, such as io.minio.GetObjectArgs.Builder for getObject, instead of the producer building the request from options and headers. deleteObjects works only with true, and listBuckets does not use it. | false | Boolean |
camel.component.minio.policy | The bucket policy, as JSON, that the endpoint sets on the bucket at startup. Not applied when objectName is set. | String | |
camel.component.minio.prefix | The prefix of the names of the objects that the consumer lists. | String | |
camel.component.minio.proxy-port | The TCP port of the server. When set, it replaces the port of the endpoint option. An endpoint with the http:// or https:// scheme keeps its scheme; for a host name without a scheme, the secure option sets it. Not used when minioClient is set. | Integer | |
camel.component.minio.recursive | Whether the consumer lists all the objects below the prefix. If false, the listing stops at the delimiter and returns the folders as entries, which the consumer skips unless includeFolders is true. | false | Boolean |
camel.component.minio.region | The region of the server, for example us-east-1. The client signs its requests for this region, and the component creates buckets in it. If not set, the client asks the server for the region of the bucket. | String | |
camel.component.minio.secret-key | The secret key (password) of the accessKey. If accessKey or secretKey is not set, the client sends the requests without credentials. Not used when minioClient is set. | String | |
camel.component.minio.secure | Whether the client uses HTTPS (true) or HTTP (false) when proxyPort is set and the endpoint option is a host name without a scheme. When the endpoint has the http:// or https:// scheme, or proxyPort is not set, this option is not used and the scheme of the endpoint applies. | false | Boolean |
camel.component.minio.server-side-encryption | The server-side encryption, as an io.minio.ServerSideEncryption such as ServerSideEncryption.S3 or ServerSideEncryption.KMS, of the objects that the producer uploads or copies with copyObject, and that the consumer copies with moveAfterRead. The producer fails to start if serverSideEncryptionCustomerKey is also set. The option is a io.minio.ServerSideEncryption type. | ServerSideEncryption | |
camel.component.minio.server-side-encryption-customer-key | The key for server-side encryption with a customer-provided key (SSE-C), as an io.minio.ServerSideEncryption.CustomerKey. The consumer uses it to get the objects and to copy them with moveAfterRead; the producer to get, upload and copy objects. The producer fails to start if serverSideEncryption is also set. The option is a io.minio.ServerSideEncryption.CustomerKey type. | ServerSideEncryption$CustomerKey | |
camel.component.minio.start-after | The object name after which the consumer lists the bucket, at the start of each pass through the bucket. The listing returns only the names that sort after it. | String | |
camel.component.minio.storage-class | The storage class of the objects that the producer uploads, sent as the x-amz-storage-class header, for example STANDARD or REDUCED_REDUNDANCY. The CamelMinioStorageClass header replaces it. | String | |
camel.component.minio.un-modified-since | The consumer gets an object only if it was not modified after this time (the If-Unmodified-Since condition). For another object, the request fails and the consumer reports an error. | ZonedDateTime | |
camel.component.minio.use-version1 | Whether the consumer lists the bucket with version 1 of the ListObjects API instead of ListObjectsV2. | false | Boolean |
camel.component.minio.version-id | The version of the objects that the consumer gets, deletes with deleteAfterRead and copies with moveAfterRead. If not set, the current version. | String |