Skip to content

CAMEL-24373: Add camel-alibaba MVP (common, OSS, MNS) — phase 1 - #25433

Open
atiaomar1978-hub wants to merge 12 commits into
apache:mainfrom
atiaomar1978-hub:feature/CAMEL-24373-alibaba-phase1
Open

CAMEL-24373: Add camel-alibaba MVP (common, OSS, MNS) — phase 1#25433
atiaomar1978-hub wants to merge 12 commits into
apache:mainfrom
atiaomar1978-hub:feature/CAMEL-24373-alibaba-phase1

Conversation

@atiaomar1978-hub

@atiaomar1978-hub atiaomar1978-hub commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Phase 1 (MVP) of CAMEL-24373: introduces the new components/camel-alibaba/ parent module with shared common code and initial Alibaba Cloud components for Object Storage (OSS) and Message Service (MNS).

Target version: Camel 4.23.0 (rebased on main @ 4.23.0-SNAPSHOT)

Modules added

Module URI scheme Description
camel-alibaba-common Shared ServiceKeys only (no SDK dependencies)
camel-alibaba-oss alibaba-oss: OSS producer/consumer using alibabacloud-oss-v2 SDK
camel-alibaba-mns alibaba-mns: MNS queue/topic messaging using aliyun-sdk-mns SDK

Review feedback addressed

  • Rebased on current main (4.23.0-SNAPSHOT) per @davsclaus
  • Moved OSS client builder to OSSUtils.createClient(); removed unused registry from common
  • Fixed OSSEndpoint/MNSEndpoint client caching and shutdown lifecycle
  • Renamed OSS content headers to CamelAlibabaOss* convention
  • Added MNS RocketMQ deprecation note in docs
  • Added endpoint lifecycle and credential precedence tests

Test plan

./mvnw -pl components/camel-alibaba/camel-alibaba-common,components/camel-alibaba/camel-alibaba-oss,components/camel-alibaba/camel-alibaba-mns -am test

Closes CAMEL-24373 (phase 1 MVP)

AI-generated PR description on behalf of atiaomar1978-hub

@atiaomar1978-hub

Copy link
Copy Markdown
Contributor Author

Bugbot / Grok Review — CAMEL-24373 Phase 1 MVP

Verdict: Approve (fixes applied before upstream PR)

Findings addressed

Severity Issue Fix
High MNS queue producer defaulted to receiveMessage Default changed to sendMessage; added SendMessageDefaultOperationTest
High OSS putObject skipped bucket validation for File bodies Bucket name validated before all body handling
Medium OSS consumer advanced continuationToken before successful delivery Token updated only after successful batch
Medium Catalog JSON not regenerated Regenerated alibaba-oss.json, alibaba-mns.json, docs
Medium MNS docs referenced non-existent starter Spring Boot starter section removed

Tests (33 passing)

./mvnw -pl components/camel-alibaba/camel-alibaba-common,components/camel-alibaba/camel-alibaba-oss,components/camel-alibaba/camel-alibaba-mns test

Follow-ups (non-blocking)

  • Presigned URLs, multipart upload (OSS); message attributes (MNS)
  • Wire AlibabaClientRegistry into endpoint lifecycle
  • STS/RAM token support; integration tests; Spring Boot starters

AI-generated review on behalf of atiaomar1978-hub

@atiaomar1978-hub
atiaomar1978-hub marked this pull request as ready for review August 10, 2026 18:04

@davsclaus davsclaus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this contribution, @atiaomar1978-hub — great to see Alibaba Cloud support coming to Camel! The component structure is well organized and follows Camel patterns nicely. I have a few items that need attention before this can be merged.

Blocking

  • Unresolved merge conflict in parent/pom.xml — the branch needs to be rebased on current main to resolve the conflict markers.

Significant

  • camel-alibaba-common depends on alibabacloud-oss-v2 — the common module pulls in the OSS SDK, which means camel-alibaba-mns transitively gets the entire OSS SDK even though it doesn't use it. AlibabaClientBuilderUtil (which creates OSS clients) should live in camel-alibaba-oss; the common module should only contain truly shared code.
  • OSSEndpoint.initClient() doesn't cache the created client — the method creates a new client but never assigns it to this.ossClient, so getOssClient() always returns null and clients may be leaked.
  • AlibabaClientRegistry is unused — defined in common but never referenced by OSS or MNS.

Moderate

  • OSS headers Content-Length and Content-Type collide with standard HTTP headers — Camel convention uses the CamelXxx prefix for component headers (the other headers in the same class follow this correctly).
  • OSSComponent.createEndpoint() missing @Override — the MNS component has it, this one doesn't.

Minor

  • OSS producer serializes all SDK responses to JSON strings via Gson, which is unusual — Camel components typically set structured response metadata in headers/properties.
  • Inconsistent switch style: MNS uses enhanced switch (->), OSS uses traditional (case: break).

Questions

  • Alibaba MNS is deprecated by Alibaba Cloud in favor of RocketMQ. Should the documentation note this?
  • OSSClient appears closeable but neither endpoint nor producer/consumer calls close() on shutdown.

Note: This review covers project rules and conventions. It does not replace specialized tools such as CodeRabbit, Sourcery, or SonarCloud for deeper static analysis.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Comment thread parent/pom.xml Outdated
<avro-ipc-jetty-version>1.12.1</avro-ipc-jetty-version>
<avro-ipc-netty-version>1.12.1</avro-ipc-netty-version>
<awaitility-version>4.3.0</awaitility-version>
<<<<<<< HEAD

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocker: Unresolved merge conflict markers. The branch needs to be rebased on current main.

<<<<<<< HEAD
        <aws-java-sdk2-version>2.50.3</aws-java-sdk2-version>
=======
...
>>>>>>> 23fa869e949

After rebasing, the resolved version should keep the new alibabacloud-oss-version and aliyun-sdk-mns-version properties and use the latest aws-java-sdk2-version from main.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — the merge conflict in parent/pom.xml was resolved and the branch has been rebased on current main (see commits 08dd1a2, 9d890ace, and latest eb936edc).

AI-generated reply on behalf of atiaomar1978-hub

<artifactId>camel-support</artifactId>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alibabacloud-oss-v2 SDK dependency is OSS-specific but lives in the common module. This means camel-alibaba-mns (which depends on common) transitively pulls in the entire OSS SDK.

Consider moving AlibabaClientBuilderUtil (the only class that uses this SDK) into camel-alibaba-oss and removing this dependency from common. The common module should only contain ServiceKeys, AlibabaClientRegistry, and other truly shared code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — the OSS SDK dependency was removed from camel-alibaba-common. Client creation now lives in OSSUtils.createClient() inside camel-alibaba-oss; the common module only contains shared ServiceKeys.

AI-generated reply on behalf of atiaomar1978-hub


String auth = getServiceKeys() != null ? getServiceKeys().getAccessKey() : getAccessKey();
String secret = getServiceKeys() != null ? getServiceKeys().getSecretKey() : getSecretKey();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The created client is returned but never assigned to this.ossClient, so getOssClient() always returns null after initialization and a new client is created on every call.

Suggested change
this.ossClient = AlibabaClientBuilderUtil.createOssClient(auth, secret, region, endpoint);
return ossClient;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — initClient() now assigns the created client to this.ossClient and returns the cached instance on subsequent calls. Non-autowired clients are closed in doStop().

AI-generated reply on behalf of atiaomar1978-hub

@Component("alibaba-oss")
public class OSSComponent extends HealthCheckComponent {

protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing @Override annotation (the MNS component has it).

Suggested change
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
@Override
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — @Override has been added to OSSComponent.createEndpoint().

AI-generated reply on behalf of atiaomar1978-hub

@cursor
cursor Bot force-pushed the feature/CAMEL-24373-alibaba-phase1 branch from 3a8d899 to 1ddf05a Compare August 11, 2026 06:21
@atiaomar1978-hub

Copy link
Copy Markdown
Contributor Author

Review feedback addressed (@davsclaus)

Thanks for the thorough review! The following items have been fixed in commits 08dd1a2 and 1ddf05a:

Severity Issue Fix
Blocking Unresolved merge conflict in parent/pom.xml Conflict resolved; branch rebased on current main
Significant camel-alibaba-common depended on OSS SDK OSS client builder moved to OSSUtils.createClient() in camel-alibaba-oss; common module now only contains ServiceKeys
Significant OSSEndpoint.initClient() didn't cache client Client assigned to this.ossClient; closed in doStop() when not autowired
Significant AlibabaClientRegistry unused Removed from common module
Moderate OSS Content-Length/Content-Type headers collide with HTTP headers Renamed to CamelAlibabaOssContentLength / CamelAlibabaOssContentType
Moderate Missing @Override on OSSComponent.createEndpoint() Added
Question MNS deprecation Added NOTE in MNS docs recommending RocketMQ for greenfield projects

Tests (33 passing)

./mvnw -pl components/camel-alibaba/camel-alibaba-common,components/camel-alibaba/camel-alibaba-oss,components/camel-alibaba/camel-alibaba-mns test

Follow-ups (non-blocking, unchanged)

  • OSS producer JSON serialization via Gson (consider structured headers in future)
  • Integration tests with testcontainers
  • Spring Boot starters

Bugbot / Grok Review

Verdict: Approve — prior blocking/significant review items addressed.

Remaining non-blocking observations:

  • OSS producer still serializes SDK responses to JSON (future improvement)
  • Switch style inconsistency between OSS/MNS (cosmetic)
  • Integration tests deferred to follow-up PR

AI-generated comment on behalf of atiaomar1978-hub

@atiaomar1978-hub

Copy link
Copy Markdown
Contributor Author

Bugbot / Grok follow-up (commit 15349b7)

Additional fixes pushed after automated review:

Severity Issue Fix
Significant OSS credential resolution ignored endpoint AK/SK when empty ServiceKeys bean present Match MNS/Huawei pattern: prefer endpoint params, then non-empty ServiceKeys
Significant MNS client never closed on shutdown Added doStop() + autowiredMnsClient flag (mirrors OSS)
Moderate listObjects ignored maxKeys and scanned entire bucket Cap collected results at maxKeys

Bugbot verdict: Approve for phase 1 MVP after these commits.

Grok verdict: Request changes resolved — remaining items are non-blocking (Gson JSON bodies, OSS doc property vs header wording, optional integration tests).

All 33 unit tests still passing locally.

AI-generated comment on behalf of atiaomar1978-hub

@davsclaus

Copy link
Copy Markdown
Contributor

okay so main is now ready for 4.23.0-SNAPSHOT and this PR needs to be rebased on top and update its versions

@cursor
cursor Bot force-pushed the feature/CAMEL-24373-alibaba-phase1 branch from ab358f2 to 9d890ac Compare August 11, 2026 16:42
@atiaomar1978-hub

Copy link
Copy Markdown
Contributor Author

Rebased on main for 4.23.0-SNAPSHOT (@davsclaus)

Addressed the latest review comment:

  • Rebased feature/CAMEL-24373-alibaba-phase1 on current main (4.23.0-SNAPSHOT)
  • Updated firstVersion from 4.22.04.23.0 across alibaba modules, docs, and catalog
  • Resolved parent/pom.xml conflicts; kept aws-java-sdk2-version 2.51.3 from main
  • Placed alibabacloud-oss-version / aliyun-sdk-mns-version in alphabetical order after allegro-converter
  • Regenerated component metadata and catalog JSON/docs

Tests

All alibaba module unit tests passing locally:

./mvnw -pl components/camel-alibaba/camel-alibaba-common,components/camel-alibaba/camel-alibaba-oss,components/camel-alibaba/camel-alibaba-mns -am test

Commit: 9d890ace93c

Ready for re-review once CI is green.

AI-generated comment on behalf of atiaomar1978-hub

@github-actions

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@davsclaus davsclaus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution, @atiaomar1978-hub — introducing Alibaba Cloud components is a great addition to the Camel ecosystem. The overall structure follows Camel conventions well (parent module layout, MojoHelper registration, lifecycle management, documentation), and the test coverage is solid.

I found several issues that need to be addressed before this can be merged. The most critical is a version mismatch in the BOM that will break downstream consumers.

Summary of findings

# Severity Finding
1 Blocking BOM hardcodes 4.22.0-SNAPSHOT instead of 4.23.0-SNAPSHOT
2 Important OSS accessKey/secretKey missing secret = true — credentials won't be masked
3 Important OSSProducer reads runtime overrides from exchange properties instead of headers
4 Important OSSProducer serializes all results to JSON strings via Gson
5 Moderate Inconsistent credential annotation style between OSS and MNS
6 Moderate operation as @UriPath with label = "producer" but consumer also supported
7 Minor Duplicate receipt-handle constants between MNSProperties and MNSHeaders

See inline comments for details.

This review focuses on project conventions and code correctness. It does not replace specialized review tools such as CodeRabbit, Sourcery, or SonarCloud.

This review was generated by an AI agent (Claude Code on behalf of davsclaus) and may contain inaccuracies. Please verify all suggestions before applying.

Comment thread bom/camel-bom/pom.xml
Comment on lines +69 to +83
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-alibaba-common</artifactId>
<version>4.22.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-alibaba-mns</artifactId>
<version>4.22.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-alibaba-oss</artifactId>
<version>4.22.0-SNAPSHOT</version>
</dependency>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: The three new BOM entries hardcode 4.22.0-SNAPSHOT instead of 4.23.0-SNAPSHOT. The parent/pom.xml and all module pom.xml files correctly use 4.23.0-SNAPSHOT. This version mismatch will break dependency management for any project importing the Camel BOM.

Note: the Camel BOM uses hardcoded versions (not ${project.version}), so these must match the current project version.

Suggested change
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-alibaba-common</artifactId>
<version>4.22.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-alibaba-mns</artifactId>
<version>4.22.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-alibaba-oss</artifactId>
<version>4.22.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-alibaba-common</artifactId>
<version>4.23.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-alibaba-mns</artifactId>
<version>4.23.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-alibaba-oss</artifactId>
<version>4.23.0-SNAPSHOT</version>
</dependency>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in eb936edc — all three alibaba BOM entries now use 4.23.0-SNAPSHOT, matching parent/pom.xml and the module POMs.

AI-generated reply on behalf of atiaomar1978-hub

Comment on lines +56 to +59
@UriParam(description = "Access key for the cloud user", displayName = "API access key (AK)",
security = "secret", label = "security")
@Metadata(required = true)
private String accessKey;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important: Missing secret = true on @UriParam. The security = "secret" attribute controls the security policy framework (e.g., camel.main.profile = prod), but it does not mask the value in logs, JMX, and management APIs. For that, secret = true is required.

Per CLAUDE.md: "Mark sensitive parameters with secret = true on @UriParam or @Metadata (passwords, tokens, API keys)".

The MNS module correctly uses secret = true — this module should do the same. Apply the same fix to the secretKey and serviceKeys fields below.

Suggested change
@UriParam(description = "Access key for the cloud user", displayName = "API access key (AK)",
security = "secret", label = "security")
@Metadata(required = true)
private String accessKey;
@UriParam(description = "Access key for the cloud user", displayName = "API access key (AK)",
secret = true, security = "secret", label = "security")
@Metadata(required = true)
private String accessKey;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in eb936edcaccessKey, secretKey, and serviceKeys on OSSEndpoint now use secret = true, security = "secret", and label = "security" so credentials are masked in logs/JMX as well as covered by the security policy framework.

AI-generated reply on behalf of atiaomar1978-hub

if (ossClient == null) {
this.ossClient = endpoint.initClient();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important — exchange properties vs headers: The updateClientConfigs() method reads runtime overrides from exchange.getProperty(OSSProperties.*), but the Camel convention is to use message headers (exchange.getIn().getHeader(...)) for dynamic parameter overrides. Exchange properties are for internal exchange metadata.

The docs table in alibaba-oss-component.adoc has the column header "Header" but the code reads from properties — users following the documentation will call setHeader("CamelAlibabaOssOperation", ...) and the producer will silently ignore it.

Recommendation: change OSSProperties to be used as header constants (like OSSHeaders already is for the consumer), and read from exchange.getIn().getHeader(...) instead of exchange.getProperty(...).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in eb936edc — runtime overrides are resolved in OSSUtils.createClientConfigurations(), which checks message headers first, then exchange properties as fallback, then endpoint/URI defaults. Tests and docs updated to use headers.

AI-generated reply on behalf of atiaomar1978-hub

super.doInit();
this.gson = new Gson();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important — JSON serialization via Gson: All producer operations serialize results to JSON strings using gson.toJson(...). This is non-standard in Camel:

  1. Most components return the SDK result object or typed Map<String, Object> as the body, letting Camel's type converter system handle serialization.
  2. Users who want to work with the structured data must parse JSON back, defeating the purpose of an integration framework.
  3. This introduces a hard runtime dependency on Gson when Jackson is already ubiquitous in the Camel ecosystem.

Consider returning the Map<String, Object> directly (or the SDK result objects). Users can convert to JSON themselves if needed via Camel's data format system.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in eb936edc — Gson was removed. Producer operations now return structured Map<String, Object> or List<Map<String, Object>> bodies. Tests assert on map entries instead of JSON strings.

AI-generated reply on behalf of atiaomar1978-hub

Comment on lines +63 to +66

@UriParam(description = "Configuration object for cloud service authentication", displayName = "Service Keys",
security = "secret")
private ServiceKeys serviceKeys;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moderate — inconsistent annotation style: MNS correctly uses secret = true here, but is missing label = "security" for catalog grouping (which OSS has). For consistency across the two modules, both endpoints should use secret = true (for masking) AND label = "security" (for catalog grouping).

Suggested change
@UriParam(description = "Configuration object for cloud service authentication", displayName = "Service Keys",
security = "secret")
private ServiceKeys serviceKeys;
@UriParam(description = "Access key for the cloud user", displayName = "Access Key",
secret = true, label = "security")
private String accessKey;

Apply the same to the secretKey and serviceKeys fields.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in eb936edc — MNS credentials now match OSS: accessKey, secretKey, and serviceKeys all use secret = true, security = "secret", and label = "security".

AI-generated reply on behalf of atiaomar1978-hub

public static final String RECEIPT_HANDLE = "CamelAlibabaMnsReceiptHandle";

public static final String MESSAGE_ID = "CamelAlibabaMnsMessageId";
public static final String REQUEST_ID = "CamelAlibabaMnsRequestId";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: MNSProperties.RECEIPT_HANDLE and MNSHeaders.RECEIPT_HANDLE both resolve to "CamelAlibabaMnsReceiptHandle". In MNSUtils.resolveReceiptHandle(), the method checks 3 different sources (property by MNSProperties.RECEIPT_HANDLE, header by MNSProperties.RECEIPT_HANDLE, header by MNSHeaders.RECEIPT_HANDLE) — but the last two are identical. Consider removing the duplicate constant or consolidating the lookup.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in eb936edc — removed RECEIPT_HANDLE, MESSAGE_ID, and MESSAGE_BODY_MD5 from MNSProperties. MNSUtils.resolveReceiptHandle() and MNSProducer now use MNSHeaders constants exclusively.

AI-generated reply on behalf of atiaomar1978-hub

Comment on lines +35 to +37
@UriEndpoint(firstVersion = "4.23.0", scheme = "alibaba-oss", title = "Alibaba Object Storage Service (OSS)",
syntax = "alibaba-oss:operation",
category = { Category.CLOUD }, headersClass = OSSHeaders.class)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moderate — URI design for consumer use: The syntax alibaba-oss:operation requires an operation as the URI path, but this component supports both producer and consumer. When used as a consumer (from("alibaba-oss:listObjects?bucketName=...")), the user must provide an operation name that is meaningless for consumers.

Consider using bucketName as the path parameter (similar to camel-aws2-s3) and making operation a query parameter, e.g.:

syntax = "alibaba-oss:bucketName"

This would make the consumer URI more natural: from("alibaba-oss:my-bucket?deleteAfterRead=true").

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in eb936edc — URI syntax is now alibaba-oss:bucketName?operation=putObject&.... The bucket name is the URI path; operation is a query parameter. Docs, tests, and catalog metadata updated.

AI-generated reply on behalf of atiaomar1978-hub

cursoragent and others added 10 commits August 12, 2026 16:02
Implement Alibaba Cloud OSS component using alibabacloud-oss-v2 SDK:
- Producer operations: listBuckets, listObjects, putObject, getObject,
  deleteObject, copyObject, headObject
- Consumer polls listObjectsV2 with optional deleteAfterRead
- Shared AlibabaClientBuilderUtil in camel-alibaba-common
- Unit tests with AssertJ and Mockito mock OSSClient

Co-authored-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com>
Implement Alibaba Cloud Message Service (MNS) component with queue and
topic support. Includes sendMessage, receiveMessage, deleteMessage, and
publishMessage operations, ScheduledBatchPollingConsumer for queue polling,
HealthCheckComponent integration, unit tests with Mockito/AssertJ, and
component documentation.

Co-authored-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com>
…stry

Add BOM/coverage entries, SDK version properties, fix MojoHelper to list
component modules only, and add AlibabaClientRegistry with tests.

Co-authored-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com>
Co-authored-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com>
- Default MNS queue producer to sendMessage; add test
- Validate OSS bucket name for all putObject body types
- Advance OSS consumer continuation token only after successful batch
- Remove non-existent Spring Boot starter from MNS docs
- Regenerate catalog entries for alibaba-oss and alibaba-mns

Co-authored-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com>
- Resolve parent/pom.xml merge conflict and keep aws-java-sdk2 2.50.3
- Move OSS client builder from common to OSSUtils in camel-alibaba-oss
- Remove unused AlibabaClientRegistry and OSS SDK dependency from common
- Cache OSS client on endpoint and close on shutdown when not autowired
- Rename OSS content headers to CamelAlibabaOss* convention
- Add @OverRide on OSSComponent.createEndpoint()
- Document MNS deprecation guidance in component docs

Co-authored-by: Cursor Agent <noreply@cursor.com>
Co-authored-by: Cursor Agent <noreply@cursor.com>
…nt lifecycle

- Prefer endpoint accessKey/secretKey over empty ServiceKeys bean (OSS)
- Cap listObjects results at maxKeys instead of scanning entire bucket
- Close MNS client on endpoint stop when not autowired

Co-authored-by: Cursor Agent <noreply@cursor.com>
Co-authored-by: Cursor Agent <noreply@cursor.com>
- Rebased on upstream main (4.23.0-SNAPSHOT)
- Updated firstVersion and docs to 4.23
- Resolved parent/pom.xml conflicts; alibaba SDK versions in alpha order
- Regenerated catalog and component metadata

Co-authored-by: Cursor Agent <noreply@cursor.com>
@davsclaus
davsclaus force-pushed the feature/CAMEL-24373-alibaba-phase1 branch from 1554797 to 3adb638 Compare August 12, 2026 14:02
- Fix BOM alibaba module versions to 4.23.0-SNAPSHOT
- Redesign OSS URI: bucketName in path, operation as query param
- Mark OSS/MNS credentials with secret=true and security label
- OSS producer resolves runtime overrides from headers first
- Return structured Map/List bodies instead of Gson JSON strings
- Remove duplicate MNS receipt-handle/message constants from MNSProperties
- Update tests, docs, and catalog metadata

Co-authored-by: Cursor Agent <noreply@cursor.com>
@atiaomar1978-hub

Copy link
Copy Markdown
Contributor Author

Review feedback addressed (@davsclaus)

Thanks for the follow-up review. The latest commit (eb936edc) addresses all remaining items:

# Severity Issue Fix
1 Blocking BOM hardcoded 4.22.0-SNAPSHOT Updated alibaba modules to 4.23.0-SNAPSHOT in bom/camel-bom/pom.xml
2 Important OSS accessKey/secretKey missing secret = true Added secret = true, security = \"secret\", label = \"security\" on OSS and MNS credentials
3 Important OSS producer read runtime overrides from properties OSSUtils.createClientConfigurations() resolves headers first, then properties, then endpoint
4 Important OSS producer serialized results to Gson JSON Producer returns structured Map/List<Map>; Gson dependency removed
5 Moderate Inconsistent MNS credential annotations MNS endpoint credentials now match OSS (secret, security, label)
6 Moderate operation as @UriPath URI is now alibaba-oss:bucketName?operation=...; bucket in path, operation as query param
7 Minor Duplicate receipt-handle constants Removed RECEIPT_HANDLE, MESSAGE_ID, MESSAGE_BODY_MD5 from MNSProperties; use MNSHeaders

Docs, tests, component metadata, and catalog JSON updated accordingly.

Tests

All alibaba module unit tests passing locally:

./mvnw -pl components/camel-alibaba/camel-alibaba-common,components/camel-alibaba/camel-alibaba-oss,components/camel-alibaba/camel-alibaba-mns -am test -Dtest='org.apache.camel.component.alibaba.**' -Dsurefire.failIfNoSpecifiedTests=false

Ready for re-review once CI is green.

AI-generated comment on behalf of atiaomar1978-hub

…ents

Commit generated files produced by the regen build so CI
"Fail if there are uncommitted changes" passes.

Co-authored-by: Cursor Agent <noreply@cursor.com>
@atiaomar1978-hub

Copy link
Copy Markdown
Contributor Author

@davsclaus please re-trigger the CI . thanks

@davsclaus

Copy link
Copy Markdown
Contributor

triggered

@github-actions github-actions Bot added the dsl label Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants