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

insert-field-action has no documentation on how to set headers/fields as value #463

Closed
hguerrero opened this issue Aug 11, 2021 · 3 comments · Fixed by #466
Closed

insert-field-action has no documentation on how to set headers/fields as value #463

hguerrero opened this issue Aug 11, 2021 · 3 comments · Fixed by #466
Assignees

Comments

@hguerrero
Copy link

When using the insert-field-action I want to use a header value like the timestamp as the value for the newly inserted field.

Example:

{"message":"hola mundo"}

I would expect to have something like this:

    - properties:
        field: ts
        value: ${timestamp}
      ref:
        apiVersion: camel.apache.org/v1alpha1
        kind: Kamelet
        name: insert-field-action

producing the following message:

{"message":"hola mundo","ts":1628678472}
@oscerd
Copy link
Contributor

oscerd commented Aug 11, 2021

It doesn't work in the same way as Kafka or Kafka connect. I'll see what could be done, but this is not critical

@oscerd oscerd self-assigned this Aug 11, 2021
@oscerd
Copy link
Contributor

oscerd commented Aug 23, 2021

By the way, what do you mean by header, a kafka header or a camel header? I don't think this is feasible in all the cases.

@hguerrero
Copy link
Author

@oscerd Camel Headers, or basically using any of the languages we can use with camel, like simple for example to get more dynamic values instead of just a contant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants