Re: Why has timePeriodMillis for the Throttle EIP been removed and how can I account for this

2024-02-01 Thread Otavio Rodolfo Piske
Hello,

Quite frankly, I don't know.

However, I did raise this question on the PR that introduced the change so
we can discuss how we can improve the documentation for scenarios such as
the one you raised.

Kind regards

On Wed, Jan 31, 2024 at 4:05 PM Schmeier, Jannik 
wrote:

> Hello,
>
> I'm wondering why the timePeriodMillis option has been removed for the
> throttle EIP.
>
> I have an endpoint that can only receive about 5 requests per minute, else
> the request will fail. I accounted for that by using a timePeriodMillis
> setting of 6 ms and a throttle value of 4.
> Now with the updated Throttle EIP I can't do that anymore.
>
> The upgrade guide suggests that the default time period is 1000 ms now,
> but obviously I can't work with that:
> https://camel.apache.org/manual/camel-4x-upgrade-guide-4_3.html#_throttle_eip
>
> Any suggestions?
>
> Best regards
>


-- 
Otavio R. Piske
http://orpiske.net


How to send form data (multipart/form-data)

2024-02-01 Thread ski n
Hi,

I need to send form data (binary files). With Curl you can do this as
follows:

curl https://reqbin.com/echo/post/form
   -F key1=value1
   -F key2=value2
   -F photo=@photo.png

or

curl https://reqbin.com/echo/post/form
   --form key1=value1
   --form key2=value2
   --form photo=@photo.png

I was first trying to use the HTTP component, but it doesn't seem to
support form data.

Normal headers are converted to HTTP headers, but you can not do name
a header with for example form.headername=headervalue

or attachments that are turned into form data.

My goal is to use a solution with the XML DSL and try to avoid custom
Java code (if possible).

As far as I can see, I have the following options:

1. Vert.x HTTP component seem to have some support for form data (not
extensively documented)

2. Mime-Multipart
(https://camel.apache.org/components/3.20.x/dataformats/mimeMultipart-dataformat.html).
Not really sure how to use it, but as I understand it,
you set the body and attachments and this turned into a mime-multipart
with marshalling. It also needs a dependency on mail, and is somehow
not an independent dataformat.

3. Apache HTTP Client: Create a custom bean/processor that uses the
Apache HTTP client to send the form data.

Has anyone had experience with this? What is the best and easiest way?

Raymond


[ANNOUNCE] Apache Camel 4.0.4 (LTS) Release

2024-02-01 Thread Gregor Zurowski
The Camel PMC is pleased to announce the release of Apache Camel 4.0.4.

Apache Camel is an open source integration framework that empowers you
to quickly and easily integrate various systems consuming or producing
data.

This is a patch release with 23 improvements and fixes.

For more details please take a look at the release notes at:

https://camel.apache.org/releases/release-4.0.4/