[GitHub] [camel-quarkus] jamesnetherton commented on issue #3131: Google-Storage Extension: Cannot set serviceAccountKey because of Quarkiverse extension
jamesnetherton commented on issue #3131: URL: https://github.com/apache/camel-quarkus/issues/3131#issuecomment-945604072 This will have been fixed by https://github.com/apache/camel-quarkus/pull/3188. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel-quarkus] ppalaga opened a new issue #3194: Fully qualify `@BuildTimeAvroDataFormat` on the Avro extension page
ppalaga opened a new issue #3194: URL: https://github.com/apache/camel-quarkus/issues/3194 On https://camel.apache.org/camel-quarkus/latest/reference/extensions/avro.html#_additional_camel_quarkus_configuration the docs says > Beyond standard usages known from vanilla Camel, Camel Quarkus adds the possibility to parse the Avro schema at build time both in JVM and Native mode via the @BuildTimeAvroDataFormat annotation. `@BuildTimeAvroDataFormat` is also used in a code snippet. We should fully qualify the class name either in both occurences or at least in the snippet. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel-k] squakez commented on pull request #2630: chore: stale bot configuration
squakez commented on pull request #2630: URL: https://github.com/apache/camel-k/pull/2630#issuecomment-945609707 Yeah, was looking at the same. It seems we previously had a different configuration but I was not aware of. I'll work on merging them into the valid one. Thanks for the help! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel-quarkus] ppalaga commented on issue #3194: Fully qualify `@BuildTimeAvroDataFormat` on the Avro extension page
ppalaga commented on issue #3194: URL: https://github.com/apache/camel-quarkus/issues/3194#issuecomment-945610297 There are also some fomatting issues on the page. `@BuildTimeAvroDataFormat` and all file paths/globs should be monospaced. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel-quarkus] ppalaga commented on issue #3194: Fully qualify `@BuildTimeAvroDataFormat` on the Avro extension page
ppalaga commented on issue #3194: URL: https://github.com/apache/camel-quarkus/issues/3194#issuecomment-945613223 Maybe the page should explain "The build time class generation approach from quarkus-avro is preferred." in more detail. Esp. we should document that `quarkus-maven-plugin:generate-code` is needed: https://github.com/apache/camel-quarkus/blob/main/integration-tests/avro/pom.xml#L97 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel-k] squakez commented on pull request #2630: chore: stale bot configuration
squakez commented on pull request #2630: URL: https://github.com/apache/camel-k/pull/2630#issuecomment-945617373 So, digging deeper, it seems that the configuration used so far was broken since a while: https://github.com/apache/camel-k/actions/runs/1352566659 - I will fix that as well :) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[camel] branch regen_bot updated (23839c3 -> 7e07d52)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch regen_bot in repository https://gitbox.apache.org/repos/asf/camel.git. omit 23839c3 Regen for commit 77db8477b20baeb949f83f877082e06a944c24bc add 8fdb9e3 CAMEL-16861: Cleanup and update EIP docs add 7e07d52 Regen for commit 8fdb9e359b11b0d4dda07440f2bad65cf337cef2 This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (23839c3) \ N -- N -- N refs/heads/regen_bot (7e07d52) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../modules/eips/pages/selective-consumer.adoc | 47 -- 1 file changed, 34 insertions(+), 13 deletions(-)
[GitHub] [camel] github-actions[bot] opened a new pull request #6294: Generated sources regen
github-actions[bot] opened a new pull request #6294: URL: https://github.com/apache/camel/pull/6294 Regen bot :robot: found some uncommited changes after running build on :camel: main. Please do not delete `regen_bot` branch after merge/rebase. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel-k] squakez opened a new issue #2698: Stale bot action failing
squakez opened a new issue #2698: URL: https://github.com/apache/camel-k/issues/2698 It seems that the configuration used so far was broken since a while: https://github.com/apache/camel-k/actions/runs/1352566659 _Originally posted by @squakez in https://github.com/apache/camel-k/issues/2630#issuecomment-945617373_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[camel-k] branch main updated: fix: Round meta.Time fields to second precision as they are marshalled in RFC3339 format
This is an automated email from the ASF dual-hosted git repository. astefanutti pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git The following commit(s) were added to refs/heads/main by this push: new a1e5530 fix: Round meta.Time fields to second precision as they are marshalled in RFC3339 format a1e5530 is described below commit a1e55305ffc34873141c264174b831bb2b45b6ba Author: Antonin Stefanutti AuthorDate: Tue Oct 12 14:58:07 2021 +0200 fix: Round meta.Time fields to second precision as they are marshalled in RFC3339 format --- pkg/apis/camel/v1/integration_types_support.go | 5 ++--- pkg/controller/integration/initialize.go | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/apis/camel/v1/integration_types_support.go b/pkg/apis/camel/v1/integration_types_support.go index 7e2e6f7..d3c8675 100644 --- a/pkg/apis/camel/v1/integration_types_support.go +++ b/pkg/apis/camel/v1/integration_types_support.go @@ -20,7 +20,6 @@ package v1 import ( "fmt" "strings" - "time" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -351,12 +350,12 @@ func (in *IntegrationStatus) SetErrorCondition(condType IntegrationConditionType // reason then we are not going to update. func (in *IntegrationStatus) SetConditions(conditions ...IntegrationCondition) { // Round to second precision, as meta.Time fields are marshalled in RFC3339 format - now := metav1.NewTime(time.Now().Round(time.Second)) + now := metav1.Now().Rfc3339Copy() for _, condition := range conditions { currentCond := in.GetCondition(condition.Type) if currentCond != nil && currentCond.Status == condition.Status && currentCond.Reason == condition.Reason && currentCond.Message == condition.Message { - return + break } if condition.LastUpdateTime.IsZero() { diff --git a/pkg/controller/integration/initialize.go b/pkg/controller/integration/initialize.go index b55066a..8f72899 100644 --- a/pkg/controller/integration/initialize.go +++ b/pkg/controller/integration/initialize.go @@ -86,7 +86,8 @@ func (action *initializeAction) Handle(ctx context.Context, integration *v1.Inte integration.Status.Phase = v1.IntegrationPhaseBuildingKit integration.Status.Version = defaults.Version if timestamp := integration.Status.InitializationTimestamp; timestamp == nil || timestamp.IsZero() { - now := metav1.Now() + // Round to second precision, as meta.Time fields are marshalled in RFC3339 format + now := metav1.Now().Rfc3339Copy() integration.Status.InitializationTimestamp = }
[GitHub] [camel-quarkus] jamesnetherton commented on issue #3194: Fully qualify `@BuildTimeAvroDataFormat` on the Avro extension page
jamesnetherton commented on issue #3194: URL: https://github.com/apache/camel-quarkus/issues/3194#issuecomment-945620530 Do we even need to mention `BuildTimeAvroDataFormat` in the docs? It's deprecated. At a minimum we should give precedence to the `quarkus-maven-plugin` code generation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel-k] astefanutti merged pull request #2689: fix: Round meta.Time fields to second precision as they are marshalled in RFC3339 format
astefanutti merged pull request #2689: URL: https://github.com/apache/camel-k/pull/2689 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel-k] squakez opened a new pull request #2699: fix(ci): broken stale action
squakez opened a new pull request #2699: URL: https://github.com/apache/camel-k/pull/2699 Fixing the configuration as since a while the following are not correct: `exempt-issue-label`, `exempt-pr-label`. Close #2698 **Release Note** ```release-note NONE ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel-quarkus] ppalaga opened a new issue #3195: Improve AWS2 DDB docs
ppalaga opened a new issue #3195: URL: https://github.com/apache/camel-quarkus/issues/3195 > Note that this optional Should be > Note that this is optional plus some more wording and spelling issues -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel] github-actions[bot] closed pull request #6294: Generated sources regen
github-actions[bot] closed pull request #6294: URL: https://github.com/apache/camel/pull/6294 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel-quarkus] VratislavHais commented on pull request #3170: Aws sqs test fix
VratislavHais commented on pull request #3170: URL: https://github.com/apache/camel-quarkus/pull/3170#issuecomment-945647544 I really don't see how my changes can affect that. Not being able to reproduce it also does not help -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel-quarkus] ppalaga opened a new issue #3191: Publish docs for the last stable release
ppalaga opened a new issue #3191: URL: https://github.com/apache/camel-quarkus/issues/3191 We should make https://camel.apache.org/camel-quarkus/2.2.0/index.html available by changing this line https://github.com/apache/camel-website/blob/main/antora-playbook.yml#L53 and we should have step documented in the release guide https://camel.apache.org/camel-quarkus/2.0.0/contributor-guide/release-guide.html -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel-k] squakez commented on issue #2697: panic: runtime error: invalid memory address or nil pointer dereference when running a simple integration
squakez commented on issue #2697: URL: https://github.com/apache/camel-k/issues/2697#issuecomment-945588480 Hello, can you confirm the name of the source Kamelet you're using is `kafka-source-kamelet`? If you were willing to use the Kamelet provided by the Catalog, then it should be `kafka-source`. If that is new Kamelet you provided, would you mind posting the configuration of that Kamelet please? (ie, `k get kafka-source-kamelet -o yaml`) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel] Croway opened a new pull request #6295: Camel 17081
Croway opened a new pull request #6295: URL: https://github.com/apache/camel/pull/6295 I'm sorry to reopen this PR, but I managed to restore the deleted test InfinispanRemoteProducerIT by using a custom infinispan.xml configuration, it is the standard infinispan.xml with the addition of __ in order to enable the metrics -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[camel] branch main updated: CAMEL-16861: Cleanup and update EIP docs
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/main by this push: new 8fdb9e3 CAMEL-16861: Cleanup and update EIP docs 8fdb9e3 is described below commit 8fdb9e359b11b0d4dda07440f2bad65cf337cef2 Author: Claus Ibsen AuthorDate: Mon Oct 18 11:10:23 2021 +0200 CAMEL-16861: Cleanup and update EIP docs --- .../modules/eips/pages/selective-consumer.adoc | 47 -- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/selective-consumer.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/selective-consumer.adoc index 81c923d..d3f017d 100644 --- a/core/camel-core-engine/src/main/docs/modules/eips/pages/selective-consumer.adoc +++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/selective-consumer.adoc @@ -4,31 +4,51 @@ Camel supports the https://www.enterpriseintegrationpatterns.com/patterns/messaging/MessageSelector.html[Selective Consumer] from the xref:enterprise-integration-patterns.adoc[EIP patterns] book. -The Selective Consumer from the EIP patterns can be implemented in two ways +How can a message consumer select which messages it wishes to receive? image::eip/MessageSelectorSolution.gif[image] -== Selective Consumer using Components +Make the consumer a Selective Consumer, one that filteres the messages delivered by its channel so that it only receives the ones that match its criteria. + +== Using Selecting Consumer + +In Camel the Selective Consumer EIP is implemented in two ways: + +- Using xref:components::index.adoc[Components] which supports message selecting. +- Using the xref:filter-eip.adoc[Filter] EIP as message selecting. + +=== Selective Consumer using Components The first solution is to provide a Message Selector to the underlying URIs when creating your consumer. -For example when using JMS you can specify a selector parameter so that the message broker will only deliver messages matching your criteria. +For example when using xref:components::jms-component.adoc[JMS] you can specify a +JMS selector parameter so that the message broker will only deliver messages matching your criteria. [source,java] -from("activemq:queue:hello?selector=color='red'") +from("jms:queue:hello?selector=color='red'") .to("bean:red"); -== Selective Consumer using Filter pattern +And in XML: + +[source,xml] + + + + + + + +=== Selective Consumer using Filter EIP The other approach is to use a xref:filter-eip.adoc[Message Filter] which is applied; -then if the filter matches the message your consumer is invoked as shown in the following example. +if the filter matches the message your "consumer" is invoked as shown in the following example: [source,java] -from("seda:a") -.filter(header("foo").isEqualTo("bar")) -.process(myProcessor); +from("seda:colors") +.filter(header("color").isEqualTo("red")) +.to("bean:red") And in XML @@ -36,10 +56,11 @@ And in XML [source,xml] - + -${header.foo} == 'bar' - +${header.color} == 'red' + - \ No newline at end of file + +
[camel] branch regen_bot updated (cb52979 -> 23839c3)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch regen_bot in repository https://gitbox.apache.org/repos/asf/camel.git. from cb52979 Sync deps add 77db847 CAMEL-16861: Cleanup and update EIP docs add 23839c3 Regen for commit 77db8477b20baeb949f83f877082e06a944c24bc No new revisions were added by this update. Summary of changes: .../docs/modules/eips/pages/scatter-gather.adoc| 65 -- .../main/docs/modules/eips/pages/script-eip.adoc | 52 - 2 files changed, 74 insertions(+), 43 deletions(-)
[GitHub] [camel] github-actions[bot] opened a new pull request #6293: Generated sources regen
github-actions[bot] opened a new pull request #6293: URL: https://github.com/apache/camel/pull/6293 Regen bot :robot: found some uncommited changes after running build on :camel: main. Please do not delete `regen_bot` branch after merge/rebase. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel] oscerd merged pull request #6293: Generated sources regen
oscerd merged pull request #6293: URL: https://github.com/apache/camel/pull/6293 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[camel] branch main updated: Regen for commit 77db8477b20baeb949f83f877082e06a944c24bc
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/main by this push: new ece95cc Regen for commit 77db8477b20baeb949f83f877082e06a944c24bc ece95cc is described below commit ece95cc3d35d2e75ac005566de3c2fde9f3bc470 Author: davsclaus AuthorDate: Mon Oct 18 09:36:59 2021 + Regen for commit 77db8477b20baeb949f83f877082e06a944c24bc Signed-off-by: GitHub --- core/camel-core-engine/src/main/docs/modules/eips/pages/script-eip.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/script-eip.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/script-eip.adoc index 550e3ca..4c08f9a 100644 --- a/core/camel-core-engine/src/main/docs/modules/eips/pages/script-eip.adoc +++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/script-eip.adoc @@ -1,7 +1,7 @@ = Script EIP :doctitle: Script :shortname: script -:dscription: Executes a script from a language which does not change the message body. +:description: Executes a script from a language which does not change the message body. :since: :supportlevel: Stable
[GitHub] [camel-quarkus] ppalaga opened a new issue #3192: Improve the description of camel-quarkus-openapi-java
ppalaga opened a new issue #3192: URL: https://github.com/apache/camel-quarkus/issues/3192 Currently it is > Rest-dsl support for using OpenAPI * It does not say what it really does * Acronyms `Rest` and `dsl` are not spelled properly. Maybe something like > Expose OpenAPI resources defined using Camel REST DSL would be better -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel-quarkus] ppalaga opened a new issue #3193: Improve the description of camel-quarkus-sql
ppalaga opened a new issue #3193: URL: https://github.com/apache/camel-quarkus/issues/3193 It is currently > Perform SQL queries using Spring JDBC. The role of Spring JDBC is not central at all in Camel Quarkus. I guess we could change it to simply > Perform SQL queries -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel-k] oscerd commented on pull request #2630: chore: stale bot configuration
oscerd commented on pull request #2630: URL: https://github.com/apache/camel-k/pull/2630#issuecomment-945602743 The stale action seems to be running fine: https://github.com/apache/camel-k/actions/workflows/stale.yaml -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[camel] branch regen_bot updated (7e07d52 -> ece95cc)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch regen_bot in repository https://gitbox.apache.org/repos/asf/camel.git. discard 7e07d52 Regen for commit 8fdb9e359b11b0d4dda07440f2bad65cf337cef2 add ece95cc Regen for commit 77db8477b20baeb949f83f877082e06a944c24bc This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (7e07d52) \ N -- N -- N refs/heads/regen_bot (ece95cc) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes:
[GitHub] [camel-quarkus] aldettinger commented on pull request #3170: Aws sqs test fix
aldettinger commented on pull request #3170: URL: https://github.com/apache/camel-quarkus/pull/3170#issuecomment-945667667 @VratislavHais If we are not sure this PR is causing the build issue. I would propose to rebase and push without the fix, have a CI build, then push the fix and have another CI build. It may be a good experiment. If we are sure the PR is causing the issue on CI, then would it be possible to comment parts of the PRs and have intermediate CI builds to check which part would be problematic ? If we are not able to correct, maybe implementing test in another way would be a way to avoid long investigation on CI builds ? And yeah, you are right those issues occurring on CI only are really hard to deal with. Sadly, it happens from time to time. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel] orpiske opened a new pull request #6297: (chores) camel-activemq: cleaned up tests to avoid Thread.sleep calls
orpiske opened a new pull request #6297: URL: https://github.com/apache/camel/pull/6297 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel] orpiske merged pull request #6296: (chores) camel-ribbon: use dynamic ports to prevent test failures
orpiske merged pull request #6296: URL: https://github.com/apache/camel/pull/6296 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[camel] branch main updated: (chores) camel-ribbon: use dynamic ports to prevent test failures
This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/main by this push: new 281656e (chores) camel-ribbon: use dynamic ports to prevent test failures 281656e is described below commit 281656e0ce33789ddbf9cc5cd362cac0e1b82b9f Author: Otavio Rodolfo Piske AuthorDate: Mon Oct 18 13:34:13 2021 +0200 (chores) camel-ribbon: use dynamic ports to prevent test failures --- .../cloud/RibbonServiceCallRegistryRouteTest.java | 13 ++-- .../cloud/RibbonServiceCallRouteDslTest.java | 20 +++ .../cloud/RibbonServiceCallRouteMetadataTest.java | 12 +++ .../ribbon/cloud/RibbonServiceCallRouteTest.java | 23 ++ .../cloud/RibbonServiceCallUpdateRouteTest.java| 23 -- 5 files changed, 55 insertions(+), 36 deletions(-) diff --git a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/RibbonServiceCallRegistryRouteTest.java b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/RibbonServiceCallRegistryRouteTest.java index 2c8c65b..e96a3e8 100644 --- a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/RibbonServiceCallRegistryRouteTest.java +++ b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/RibbonServiceCallRegistryRouteTest.java @@ -23,6 +23,7 @@ import org.apache.camel.impl.cloud.StaticServiceDiscovery; import org.apache.camel.model.cloud.ServiceCallConfigurationDefinition; public class RibbonServiceCallRegistryRouteTest extends RibbonServiceCallRouteTest { + @Override protected RoutesBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { @@ -30,8 +31,8 @@ public class RibbonServiceCallRegistryRouteTest extends RibbonServiceCallRouteTe public void configure() throws Exception { // setup a static ribbon server list with these 2 servers to start with StaticServiceDiscovery servers = new StaticServiceDiscovery(); -servers.addServer("myService@localhost:9090"); -servers.addServer("myService@localhost:9091"); +servers.addServer("myService@localhost:" + PORT1); +servers.addServer("myService@localhost:" + PORT2); RibbonConfiguration configuration = new RibbonConfiguration(); RibbonServiceLoadBalancer loadBalancer = new RibbonServiceLoadBalancer(configuration); @@ -50,11 +51,11 @@ public class RibbonServiceCallRegistryRouteTest extends RibbonServiceCallRouteTe .component("http") .end() .to("mock:result"); -from("jetty:http://localhost:9090;) -.to("mock:9090") +fromF("jetty:http://localhost:%d;, PORT1) +.to("mock:" + ROUTE_1_ID) .transform().constant("9090"); -from("jetty:http://localhost:9091;) -.to("mock:9091") +fromF("jetty:http://localhost:%d;, PORT2) +.to("mock:" + ROUTE_2_ID) .transform().constant("9091"); } }; diff --git a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/RibbonServiceCallRouteDslTest.java b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/RibbonServiceCallRouteDslTest.java index 3acd72a..6fe78d9 100644 --- a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/RibbonServiceCallRouteDslTest.java +++ b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/RibbonServiceCallRouteDslTest.java @@ -18,16 +18,20 @@ package org.apache.camel.component.ribbon.cloud; import org.apache.camel.RoutesBuilder; import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.test.AvailablePortFinder; import org.apache.camel.test.junit5.CamelTestSupport; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; public class RibbonServiceCallRouteDslTest extends CamelTestSupport { +private static final int PORT1 = AvailablePortFinder.getNextAvailable(); +private static final int PORT2 = AvailablePortFinder.getNextAvailable(); + @Test public void testServiceCall() throws Exception { -getMockEndpoint("mock:9090").expectedMessageCount(1); -getMockEndpoint("mock:9091").expectedMessageCount(1); +getMockEndpoint("mock:" + PORT1).expectedMessageCount(1); +getMockEndpoint("mock:" + PORT2).expectedMessageCount(1); getMockEndpoint("mock:result").expectedMessageCount(2); String out = template.requestBody("direct:start", null,
[GitHub] [camel-quarkus] djencks commented on issue #3191: Publish docs for the last stable release
djencks commented on issue #3191: URL: https://github.com/apache/camel-quarkus/issues/3191#issuecomment-945766712 I'll be pushing some changes to the website and most contributing projects in the next day or two and can easily include this. I wouldn't expect it to cause me a problem if you'd rather do this first. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel] orpiske commented on pull request #6292: CAMEL-17096: Add async commit support in camel-kafka component
orpiske commented on pull request #6292: URL: https://github.com/apache/camel/pull/6292#issuecomment-945767772 I'm wondering whether it wouldn't better - from a maintenance perspective - to have the async commit in a separated class. We would need to adjust the KafkaManualCommit to rename the `commitSync` to `commit` but I think it could lead to a solution that is easier to maintain (*IMHO*). What do you think @davsclaus, @oscerd and others? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel] oscerd commented on pull request #6292: CAMEL-17096: Add async commit support in camel-kafka component
oscerd commented on pull request #6292: URL: https://github.com/apache/camel/pull/6292#issuecomment-945768737 Makes sense, I think it would be cleaner. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[camel-performance-tests] 01/01: Minio Kafka: Set Localhost as ip for the minio instance
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch minio-kafka-2 in repository https://gitbox.apache.org/repos/asf/camel-performance-tests.git commit 8b932a6e387ea47ac18cef0913a1a71f636b7bab Author: Andrea Cosentino AuthorDate: Mon Oct 18 15:02:38 2021 +0200 Minio Kafka: Set Localhost as ip for the minio instance --- profiling/minio-kafka/data/sources/routes.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiling/minio-kafka/data/sources/routes.yaml b/profiling/minio-kafka/data/sources/routes.yaml index fac72ed..1e2d6fe 100644 --- a/profiling/minio-kafka/data/sources/routes.yaml +++ b/profiling/minio-kafka/data/sources/routes.yaml @@ -22,7 +22,7 @@ bucketName: "ckc" accessKey: "minio" secretKey: "miniostorage" -endpoint: "http://192.168.1.19:9000; +endpoint: "http://localhost:9000; steps: - to: uri: "kamelet:kafka-not-secured-sink"
[camel-performance-tests] branch minio-kafka-2 created (now 8b932a6)
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a change to branch minio-kafka-2 in repository https://gitbox.apache.org/repos/asf/camel-performance-tests.git. at 8b932a6 Minio Kafka: Set Localhost as ip for the minio instance This branch includes the following new commits: new 8b932a6 Minio Kafka: Set Localhost as ip for the minio instance The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[camel-performance-tests] branch main updated: Minio Kafka: Set Localhost as ip for the minio instance
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-performance-tests.git The following commit(s) were added to refs/heads/main by this push: new 1c379f0 Minio Kafka: Set Localhost as ip for the minio instance 1c379f0 is described below commit 1c379f0da78cd21c6d914ec9af84cc51132976c1 Author: Andrea Cosentino AuthorDate: Mon Oct 18 15:02:38 2021 +0200 Minio Kafka: Set Localhost as ip for the minio instance --- profiling/minio-kafka/data/sources/routes.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiling/minio-kafka/data/sources/routes.yaml b/profiling/minio-kafka/data/sources/routes.yaml index fac72ed..1e2d6fe 100644 --- a/profiling/minio-kafka/data/sources/routes.yaml +++ b/profiling/minio-kafka/data/sources/routes.yaml @@ -22,7 +22,7 @@ bucketName: "ckc" accessKey: "minio" secretKey: "miniostorage" -endpoint: "http://192.168.1.19:9000; +endpoint: "http://localhost:9000; steps: - to: uri: "kamelet:kafka-not-secured-sink"
[GitHub] [camel-performance-tests] oscerd merged pull request #45: Minio Kafka: Set Localhost as ip for the minio instance
oscerd merged pull request #45: URL: https://github.com/apache/camel-performance-tests/pull/45 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel] github-actions[bot] opened a new pull request #6298: Generated sources regen
github-actions[bot] opened a new pull request #6298: URL: https://github.com/apache/camel/pull/6298 Regen bot :robot: found some uncommited changes after running build on :camel: main. Please do not delete `regen_bot` branch after merge/rebase. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[camel] branch regen_bot updated (ece95cc -> 972fa46)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch regen_bot in repository https://gitbox.apache.org/repos/asf/camel.git. from ece95cc Regen for commit 77db8477b20baeb949f83f877082e06a944c24bc add f4dd63e CAMEL-16861: Cleanup and update EIP docs add 972fa46 Regen for commit f4dd63e9182d29c794d5248c6ecda6f9ab1be74b No new revisions were added by this update. Summary of changes: .../sql/stored/template/generated/SSPTParser.java | 833 +++-- .../template/generated/SSPTParserConstants.java| 110 +- .../template/generated/SSPTParserTokenManager.java | 1222 ++-- .../docs/modules/eips/pages/service-activator.adoc | 22 +- .../docs/modules/eips/pages/serviceCall-eip.adoc | 189 ++- 5 files changed, 1173 insertions(+), 1203 deletions(-)
[GitHub] [camel] oscerd closed pull request #6298: Generated sources regen
oscerd closed pull request #6298: URL: https://github.com/apache/camel/pull/6298 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[camel] branch regen_bot updated (972fa46 -> 8f82205)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch regen_bot in repository https://gitbox.apache.org/repos/asf/camel.git. omit 972fa46 Regen for commit f4dd63e9182d29c794d5248c6ecda6f9ab1be74b add 8f82205 Restore RemoteProducerIT test This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (972fa46) \ N -- N -- N refs/heads/regen_bot (8f82205) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../remote/InfinispanRemoteProducerIT.java}| 31 +- .../sql/stored/template/generated/SSPTParser.java | 833 ++--- .../template/generated/SSPTParserConstants.java| 110 +- .../template/generated/SSPTParserTokenManager.java | 1222 ++-- .../services/InfinispanLocalContainerService.java |3 + .../src/test/resources/infinispan.xml | 72 ++ 6 files changed, 1181 insertions(+), 1090 deletions(-) copy components/camel-infinispan/{camel-infinispan-embedded/src/test/java/org/apache/camel/component/infinispan/embedded/InfinispanEmbeddedProducerTest.java => camel-infinispan/src/test/java/org/apache/camel/component/infinispan/remote/InfinispanRemoteProducerIT.java} (79%) create mode 100644 test-infra/camel-test-infra-infinispan/src/test/resources/infinispan.xml
[GitHub] [camel] davsclaus commented on a change in pull request #6292: CAMEL-17096: Add async commit support in camel-kafka component
davsclaus commented on a change in pull request #6292: URL: https://github.com/apache/camel/pull/6292#discussion_r730922524 ## File path: components/camel-kafka/src/main/java/org/apache/camel/component/kafka/DefaultKafkaManualCommit.java ## @@ -70,6 +83,26 @@ protected void commitOffset(StateRepository offsetRepository, To } } +protected void commitAsyncOffset( +StateRepository offsetRepository, TopicPartition partition, long recordOffset) { +if (recordOffset != -1) { +if (offsetRepository != null) { +offsetRepository.setState(serializeOffsetKey(partition), serializeOffsetValue(recordOffset)); +} else { +LOG.debug("CommitAsync {} from topic {} with offset: {}", threadId, topicName, recordOffset); +consumer.commitAsync(Collections.singletonMap(partition, new OffsetAndMetadata(recordOffset + 1)), +(offsets, exception) -> { +if (exception != null) { +LOG.error("Error during async commit: ", exception); +} else { +LOG.info("CommitAsync done for {} from topic {} with offset: {}", threadId, topicName, Review comment: Reduce logging noise as INFO is too verbose, use DEBUG or TRACE ## File path: components/camel-kafka/src/main/java/org/apache/camel/component/kafka/DefaultKafkaManualCommit.java ## @@ -70,6 +83,26 @@ protected void commitOffset(StateRepository offsetRepository, To } } +protected void commitAsyncOffset( +StateRepository offsetRepository, TopicPartition partition, long recordOffset) { +if (recordOffset != -1) { +if (offsetRepository != null) { +offsetRepository.setState(serializeOffsetKey(partition), serializeOffsetValue(recordOffset)); +} else { +LOG.debug("CommitAsync {} from topic {} with offset: {}", threadId, topicName, recordOffset); +consumer.commitAsync(Collections.singletonMap(partition, new OffsetAndMetadata(recordOffset + 1)), +(offsets, exception) -> { +if (exception != null) { +LOG.error("Error during async commit: ", exception); Review comment: You can maybe add more details to this error message about topic, offset etc -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[camel] branch regen_bot updated (8f82205 -> 8baecff)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch regen_bot in repository https://gitbox.apache.org/repos/asf/camel.git. from 8f82205 Restore RemoteProducerIT test add ba3f24e CAMEL-16861: Cleanup and update EIP docs add 8baecff CAMEL-16861: Cleanup and update EIP docs No new revisions were added by this update. Summary of changes: .../docs/modules/eips/pages/setHeader-eip.adoc | 83 -- .../docs/modules/eips/pages/setOutHeader-eip.adoc | 48 - 2 files changed, 63 insertions(+), 68 deletions(-) delete mode 100644 core/camel-core-engine/src/main/docs/modules/eips/pages/setOutHeader-eip.adoc
[camel] 03/03: CAMEL-17101: Split EIP should support splitting a java.util.Map into a Set - so it works out of the box, and what you would assume Camel can do.
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git commit 20c6cd1a7ed6bd353cf51a2842187aa6d388e1c3 Author: Claus Ibsen AuthorDate: Mon Oct 18 15:37:16 2021 +0200 CAMEL-17101: Split EIP should support splitting a java.util.Map into a Set - so it works out of the box, and what you would assume Camel can do. --- docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_13.adoc | 5 + 1 file changed, 5 insertions(+) diff --git a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_13.adoc b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_13.adoc index 8908124..27d224a 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_13.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_13.adoc @@ -12,6 +12,11 @@ Added method `getStartedEventNotifiers` to `org.apache.camel.spi.ManagementStrat Added method `scheduleQueue` to `org.apache.camel.spi.ReactiveExecutor`. +=== Split EIP + +The Split EIP now supports splitting message bodies that are of type `java.util.Map`, which +now splits that into a `Set` - eg a set of each map entry as key/value pairs. + === SimpleBuilder The `org.apache.camel.builder.SimpleBuilder` has been deprecated. This builder
[camel] branch main updated (281656e -> 20c6cd1)
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/camel.git. from 281656e (chores) camel-ribbon: use dynamic ports to prevent test failures new cf2410b CAMEL-17101: Split EIP should support splitting a java.util.Map into a Set - so it works out of the box, and what you would assume Camel can do. new 2fc2127 Polished new 20c6cd1 CAMEL-17101: Split EIP should support splitting a java.util.Map into a Set - so it works out of the box, and what you would assume Camel can do. The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: ...erRegexpGroupTest.java => SplitterMapTest.java} | 27 +++--- .../org/apache/camel/support/ObjectHelper.java | 11 - .../ROOT/pages/camel-3x-upgrade-guide-3_13.adoc| 5 3 files changed, 29 insertions(+), 14 deletions(-) copy core/camel-core/src/test/java/org/apache/camel/processor/{SplitTokenizerRegexpGroupTest.java => SplitterMapTest.java} (62%)
[camel] 01/03: CAMEL-17101: Split EIP should support splitting a java.util.Map into a Set - so it works out of the box, and what you would assume Camel can do.
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git commit cf2410bf8a5fa898ef9dfb8e4c58c6498da72403 Author: Claus Ibsen AuthorDate: Mon Oct 18 15:21:42 2021 +0200 CAMEL-17101: Split EIP should support splitting a java.util.Map into a Set - so it works out of the box, and what you would assume Camel can do. --- .../apache/camel/processor/SplitterMapTest.java| 59 ++ .../org/apache/camel/support/ObjectHelper.java | 4 ++ 2 files changed, 63 insertions(+) diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/SplitterMapTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterMapTest.java new file mode 100644 index 000..d6fe903 --- /dev/null +++ b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterMapTest.java @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.processor; + +import java.util.LinkedHashMap; +import java.util.Map; + +import org.apache.camel.ContextTestSupport; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.mock.MockEndpoint; +import org.junit.jupiter.api.Test; + +public class SplitterMapTest extends ContextTestSupport { + +@Test +public void testSplitMap() throws Exception { +MockEndpoint mock = getMockEndpoint("mock:line"); +mock.message(0).body().isEqualTo("Hello World"); +mock.message(0).header("myKey").isEqualTo("123"); +mock.message(1).body().isEqualTo("Bye World"); +mock.message(1).header("myKey").isEqualTo("789"); + +Map map = new LinkedHashMap<>(); +map.put("123", "Hello World"); +map.put("789", "Bye World"); + +template.sendBody("direct:start", map); + +assertMockEndpointsSatisfied(); +} + +@Override +protected RouteBuilder createRouteBuilder() throws Exception { +return new RouteBuilder() { +@Override +public void configure() throws Exception { +from("direct:start") +.split(body()) +.setHeader("myKey").simple("${body.key}") +.setBody(simple("${body.value}")) +.to("mock:line"); +} +}; +} +} diff --git a/core/camel-support/src/main/java/org/apache/camel/support/ObjectHelper.java b/core/camel-support/src/main/java/org/apache/camel/support/ObjectHelper.java index c4f982b..11dc820 100644 --- a/core/camel-support/src/main/java/org/apache/camel/support/ObjectHelper.java +++ b/core/camel-support/src/main/java/org/apache/camel/support/ObjectHelper.java @@ -24,6 +24,7 @@ import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.Locale; +import java.util.Map; import java.util.NoSuchElementException; import java.util.concurrent.Callable; import java.util.regex.Pattern; @@ -694,6 +695,9 @@ public final class ObjectHelper { }; } else if (value instanceof Iterable) { return (Iterable) value; +} else if (value instanceof Map) { +Map map = (Map) value; +return map.entrySet(); } else if (value.getClass().isArray()) { if (org.apache.camel.util.ObjectHelper.isPrimitiveArrayType(value.getClass())) { final Object array = value;
[camel] 02/03: Polished
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git commit 2fc21275d62dd88972ad3d4bad9725a0ca49dd9f Author: Claus Ibsen AuthorDate: Mon Oct 18 15:35:22 2021 +0200 Polished --- .../src/main/java/org/apache/camel/support/ObjectHelper.java | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/core/camel-support/src/main/java/org/apache/camel/support/ObjectHelper.java b/core/camel-support/src/main/java/org/apache/camel/support/ObjectHelper.java index 11dc820..3d21f38 100644 --- a/core/camel-support/src/main/java/org/apache/camel/support/ObjectHelper.java +++ b/core/camel-support/src/main/java/org/apache/camel/support/ObjectHelper.java @@ -687,12 +687,7 @@ public final class ObjectHelper { return Collections.emptyList(); } else if (value instanceof Iterator) { final Iterator iterator = (Iterator) value; -return new Iterable() { -@Override -public Iterator iterator() { -return iterator; -} -}; +return (Iterable) () -> iterator; } else if (value instanceof Iterable) { return (Iterable) value; } else if (value instanceof Map) {
[GitHub] [camel] orpiske commented on a change in pull request #6292: CAMEL-17096: Add async commit support in camel-kafka component
orpiske commented on a change in pull request #6292: URL: https://github.com/apache/camel/pull/6292#discussion_r730930389 ## File path: components/camel-kafka/src/main/java/org/apache/camel/component/kafka/DefaultKafkaManualCommit.java ## @@ -70,6 +83,26 @@ protected void commitOffset(StateRepository offsetRepository, To } } +protected void commitAsyncOffset( +StateRepository offsetRepository, TopicPartition partition, long recordOffset) { +if (recordOffset != -1) { Review comment: You could probably use `KafkaRecordProcessor.START_OFFSET` here instead of -1. Obs.: I know we are using -1 on other parts of this code, but it's on my cleanup TODO to fix it. ## File path: components/camel-kafka/src/test/java/org/apache/camel/component/kafka/integration/KafkaConsumerAsyncManualCommitIT.java ## @@ -0,0 +1,142 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.kafka.integration; + +import java.util.Collections; +import java.util.Properties; + +import org.apache.camel.Endpoint; +import org.apache.camel.EndpointInject; +import org.apache.camel.Exchange; +import org.apache.camel.builder.AggregationStrategies; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.kafka.KafkaConstants; +import org.apache.camel.component.kafka.KafkaManualCommit; +import org.apache.camel.component.mock.MockEndpoint; +import org.apache.kafka.clients.producer.ProducerRecord; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.RepeatedTest; + +import static org.junit.jupiter.api.Assertions.assertNotNull; + +public class KafkaConsumerAsyncManualCommitIT extends BaseEmbeddedKafkaTestSupport { + +public static final String TOPIC = "testManualCommitTest"; + +@EndpointInject("kafka:" + TOPIC ++ "?groupId=group1=3=false" ++ "=true=earliest") +private Endpoint from; + +@EndpointInject("mock:result") +private MockEndpoint to; + +@EndpointInject("mock:resultBar") +private MockEndpoint toBar; + +private org.apache.kafka.clients.producer.KafkaProducer producer; + +@BeforeEach +public void before() { +Properties props = getDefaultProperties(); +producer = new org.apache.kafka.clients.producer.KafkaProducer<>(props); +} + +@AfterEach +public void after() { +if (producer != null) { +producer.close(); +} +// clean all test topics +kafkaAdminClient.deleteTopics(Collections.singletonList(TOPIC)); +} + +@Override +protected RouteBuilder createRouteBuilder() throws Exception { +return new RouteBuilder() { + +@Override +public void configure() throws Exception { +from(from).routeId("foo").to("direct:aggregate"); +// With sync manual commit, this would throw a concurrent modification exception +// It can be usesd in aggregator with completion timeout/interval for instance +// WARN: records from one partition must be processed by one unique thread +from("direct:aggregate").routeId("aggregate").to(to) +.aggregate() +.constant(true) +.completionTimeout(1) + .aggregationStrategy(AggregationStrategies.groupedExchange()) +.split().body() +.process(e -> { +KafkaManualCommit manual = e.getMessage().getBody(Exchange.class) + .getMessage().getHeader(KafkaConstants.MANUAL_COMMIT, KafkaManualCommit.class); +assertNotNull(manual); +if (e.getMessage().getBody(String.class).equals("message-0")) { +// Delay the commit of the first message +Thread.sleep(2000); Review comment: I think it would be better to avoid the `Thread.sleep` call. My .2 cents is to try to use one of the Java
[camel] branch main updated: (chores) camel-activemq: cleaned up tests to avoid Thread.sleep calls
This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/main by this push: new b979c10 (chores) camel-activemq: cleaned up tests to avoid Thread.sleep calls b979c10 is described below commit b979c10cdcdd64be6f653550d1ddafc2deda9ad3 Author: Otavio Rodolfo Piske AuthorDate: Mon Oct 18 15:22:33 2021 +0200 (chores) camel-activemq: cleaned up tests to avoid Thread.sleep calls --- .../camel/component/activemq/AMQ2611Test.java | 25 ++-- ...ample.java => AdvisoryConsumerExampleTest.java} | 8 ++ .../component/activemq/ObjectMessageTest.java | 33 ++ .../component/activemq/PoisonJMSPayloadTest.java | 20 + 4 files changed, 67 insertions(+), 19 deletions(-) diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AMQ2611Test.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AMQ2611Test.java index 9d30a40..c791826 100644 --- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AMQ2611Test.java +++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AMQ2611Test.java @@ -16,12 +16,16 @@ */ package org.apache.camel.component.activemq; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + import org.apache.camel.Body; import org.apache.camel.CamelContext; import org.apache.camel.ProducerTemplate; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.activemq.support.ActiveMQSupport; import org.apache.camel.impl.DefaultCamelContext; +import org.apache.camel.support.LifecycleStrategySupport; import org.apache.camel.test.infra.activemq.services.ActiveMQEmbeddedService; import org.apache.camel.test.infra.activemq.services.ActiveMQEmbeddedServiceBuilder; import org.junit.jupiter.api.Test; @@ -42,6 +46,8 @@ public class AMQ2611Test implements ActiveMQSupport { .build(); private CamelContext camelContext; +private CountDownLatch startedLatch = new CountDownLatch(1); +private CountDownLatch stoppedLatch = new CountDownLatch(1); public static class Consumer { public void consume(@Body String message) { @@ -60,6 +66,21 @@ public class AMQ2611Test implements ActiveMQSupport { from(queueEndpointName).bean(Consumer.class, "consume"); } }); + +camelContext.addLifecycleStrategy(new LifecycleStrategySupport() { +@Override +public void onContextStarted(CamelContext context) { +super.onContextStarted(context); +startedLatch.countDown(); +} + +@Override +public void onContextStopped(CamelContext context) { +super.onContextStopped(context); +stoppedLatch.countDown(); +} +}); + camelContext.start(); final ProducerTemplate producerTemplate = camelContext.createProducerTemplate(); producerTemplate.sendBody(queueEndpointName, "message"); @@ -77,9 +98,9 @@ public class AMQ2611Test implements ActiveMQSupport { int i = 0; while (i++ < 5) { createCamelContext(); -Thread.sleep(1000); +startedLatch.await(1, TimeUnit.SECONDS); destroyCamelContext(); -Thread.sleep(1000); +stoppedLatch.await(1, TimeUnit.SECONDS); assertEquals(0, service.getConnectionCount()); } } catch (Exception e) { diff --git a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AdvisoryConsumerExample.java b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AdvisoryConsumerExampleTest.java similarity index 96% rename from components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AdvisoryConsumerExample.java rename to components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AdvisoryConsumerExampleTest.java index 99aa6b5..311cc42 100644 --- a/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AdvisoryConsumerExample.java +++ b/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/AdvisoryConsumerExampleTest.java @@ -35,16 +35,14 @@ import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; /** * */ -public class AdvisoryConsumerExample extends ActiveMQTestSupport { -private static final Logger LOG = LoggerFactory.getLogger(AdvisoryConsumerExample.class); +public class AdvisoryConsumerExampleTest extends ActiveMQTestSupport { +private static final Logger LOG = LoggerFactory.getLogger(AdvisoryConsumerExampleTest.class); -@Test() +@Test public void testWorks()
[GitHub] [camel] orpiske merged pull request #6297: (chores) camel-activemq: cleaned up tests to avoid Thread.sleep calls
orpiske merged pull request #6297: URL: https://github.com/apache/camel/pull/6297 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[camel] branch regen_bot updated (8baecff -> 281656e)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch regen_bot in repository https://gitbox.apache.org/repos/asf/camel.git. from 8baecff CAMEL-16861: Cleanup and update EIP docs add 281656e (chores) camel-ribbon: use dynamic ports to prevent test failures No new revisions were added by this update. Summary of changes: .../cloud/RibbonServiceCallRegistryRouteTest.java | 13 ++-- .../cloud/RibbonServiceCallRouteDslTest.java | 20 +++ .../cloud/RibbonServiceCallRouteMetadataTest.java | 12 +++ .../ribbon/cloud/RibbonServiceCallRouteTest.java | 23 ++ .../cloud/RibbonServiceCallUpdateRouteTest.java| 23 -- 5 files changed, 55 insertions(+), 36 deletions(-)
[GitHub] [camel-website] apupier opened a new pull request #647: [Blog] VS Code Camel Language support 0.1.0 announcement
apupier opened a new pull request #647: URL: https://github.com/apache/camel-website/pull/647 Signed-off-by: Aurélien Pupier -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org