Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAMEL-20601: Support error handler on Camel JBang bind command #13594

Merged

Conversation

christophd
Copy link
Contributor

Description

CAMEL-20601

  • Allow to add error handler to the Pipe resource
  • Support different error handler types (sink, uri, log, none)
  • Support user properties on the error handlers

User can add the error handler with new command option --error-handler:

camel bind timer-to-http --source timer-source --sink http-sink --error-handler log-sink

It results in a error handler specification set on the Pipe:

apiVersion: camel.apache.org/v1
kind: Pipe
metadata:
  name: timer-to-log
spec:
  source:
    ref:
      kind: Kamelet
      apiVersion: camel.apache.org/v1
      name: timer-source
    properties:
      message: "hello world"
  sink:
    ref:
      kind: Kamelet
      apiVersion: camel.apache.org/v1
      name: http-sink
    properties:
      url: http://localhost:8080
  errorHandler:
    sink:
      endpoint:
        ref:
          kind: Kamelet
          apiVersion: camel.apache.org/v1
          name: log-sink

Target

  • I checked that the commit is targeting the correct branch (note that Camel 3 uses camel-3.x, whereas Camel 4 uses the main branch)

See CAMEL-20601

Tracking

  • If this is a large change, bug fix, or code improvement, I checked there is a JIRA issue filed for the change (usually before you start working on it).

Apache Camel coding standards and style

  • I checked that each commit in the pull request has a meaningful subject line and body.
  • I have run mvn clean install -DskipTests locally and I have committed all auto-generated changes

- Allow to add error handler to the Pipe resource
- Support different error handler types (sink, uri, log, none)
- Support user properties on the error handlers
@davsclaus
Copy link
Contributor

modified:   dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Bind.java

@davsclaus
Copy link
Contributor

lets merge and rebuild locally

@davsclaus davsclaus merged commit 5a10130 into apache:main Mar 22, 2024
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants