Overview
The pfx-google-storage (Google Cloud Storage) support in IM uses the standard Apache Camel camel-google-storage component — it is not a custom Pricefx component. It is included as a dependency in IM to allow routes to read from and write to Google Cloud Storage (GCS) buckets.
For full documentation see the Apache Camel Google Storage component docs.
URI pattern: google-storage://bucket-name[?options]
Common Use Cases
Read a file from GCS and import to Pricefx
<routes xmlns="http://camel.apache.org/schema/spring">
<route id="gcsImport">
<from uri="google-storage://{{gcs.bucket}}
?serviceAccountKey={{gcs.keyFile}}
&prefix=imports/products/
&deleteAfterRead=true
&maxMessagesPerPoll=1"/>
<to uri="pfx-csv:unmarshal?delimiter=,"/>
<to uri="pfx-api:loaddata?objectType=P&mapper=productMapper"/>
<onCompletion onCompleteOnly="true">
<to uri="pfx-api:internalCopy?label=Product"/>
</onCompletion>
</route>
</routes>
Export from Pricefx and write to GCS
<routes xmlns="http://camel.apache.org/schema/spring">
<route id="gcsExport">
<from uri="timer://export?repeatCount=1"/>
<to uri="pfx-api:fetch?objectType=PX&filter=pricelistFilter"/>
<to uri="pfx-csv:marshal"/>
<setHeader name="CamelGoogleCloudStorageObjectName">
<simple>exports/pricelist-${date:now:yyyyMMdd}.csv</simple>
</setHeader>
<to uri="google-storage://{{gcs.bucket}}?serviceAccountKey={{gcs.keyFile}}"/>
</route>
</routes>
Authentication
Use a GCP service account JSON key file. Store the key file path in config/application.properties and reference it via {{property}} placeholder — never hardcode credentials.
gcs.bucket=my-integration-bucket
gcs.keyFile=/path/to/service-account.json
Common Pitfalls
-
The URI scheme is
google-storage://(notpfx-google-storage:) — this is the standard Apache Camel component. -
The service account must have
Storage Object Adminrole on the target bucket. -
deleteAfterRead=trueremoves the file from GCS after successful processing — use cautiously in non-idempotent routes. -
For the full parameter reference see the official Camel docs.