This is an automated email from the ASF dual-hosted git repository. nfilotto pushed a commit to branch CAMEL-17792/doc-message-headers in repository https://gitbox.apache.org/repos/asf/camel.git
commit 113d67bad3124ecb474039a3ea7c8f12b46389cf Author: Nicolas Filotto <nfilo...@talend.com> AuthorDate: Mon Apr 4 16:43:13 2022 +0200 CAMEL-17792: Add doc about the message headers of camel-reactive-streams --- .../apache/camel/component/reactive/streams/reactive-streams.json | 4 ++++ .../src/main/docs/reactive-streams-component.adoc | 4 +++- .../camel/component/reactive/streams/ReactiveStreamsConstants.java | 5 ++++- .../camel/component/reactive/streams/ReactiveStreamsEndpoint.java | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/components/camel-reactive-streams/src/generated/resources/org/apache/camel/component/reactive/streams/reactive-streams.json b/components/camel-reactive-streams/src/generated/resources/org/apache/camel/component/reactive/streams/reactive-streams.json index 456515615ea..e52ff283681 100644 --- a/components/camel-reactive-streams/src/generated/resources/org/apache/camel/component/reactive/streams/reactive-streams.json +++ b/components/camel-reactive-streams/src/generated/resources/org/apache/camel/component/reactive/streams/reactive-streams.json @@ -32,6 +32,10 @@ "reactiveStreamsEngineConfiguration": { "kind": "property", "displayName": "Reactive Streams Engine Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.reactive.streams.engine.ReactiveStreamsEngineConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "To use an existing reactive stream engine configuration." }, "serviceType": { "kind": "property", "displayName": "Service Type", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Set the type of the underlying reactive streams implementation to use. The implementation is looked up from the registry or using a ServiceLoader, the default implementation is DefaultCamelReactiveStreamsService" } }, + "headers": { + "CamelReactiveStreamsEventType": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Every exchange consumed by Camel has this header set to indicate if the exchange contains an item (value=onNext), an error (value=onError) or a completion event (value=onComplete). Errors and completion notification are not forwarded by [...] + "CamelReactiveStreamsCallback": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "org.apache.camel.component.reactive.streams.api.DispatchCallback", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The callback." } + }, "properties": { "stream": { "kind": "path", "displayName": "Stream", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of the stream channel used by the endpoint to exchange messages." }, "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a m [...] diff --git a/components/camel-reactive-streams/src/main/docs/reactive-streams-component.adoc b/components/camel-reactive-streams/src/main/docs/reactive-streams-component.adoc index f18ade2c7e2..19a40200102 100644 --- a/components/camel-reactive-streams/src/main/docs/reactive-streams-component.adoc +++ b/components/camel-reactive-streams/src/main/docs/reactive-streams-component.adoc @@ -62,7 +62,9 @@ include::partial$component-endpoint-options.adoc[] // endpoint options: START // endpoint options: END - +// component headers: START +include::partial$component-endpoint-headers.adoc[] +// component headers: END == Usage diff --git a/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsConstants.java b/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsConstants.java index c7ce14fa145..353ac5a0ed3 100644 --- a/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsConstants.java +++ b/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsConstants.java @@ -16,6 +16,8 @@ */ package org.apache.camel.component.reactive.streams; +import org.apache.camel.spi.Metadata; + /** * Useful constants used in the Camel Reactive Streams component. */ @@ -30,8 +32,9 @@ public final class ReactiveStreamsConstants { * (value="onNext"), an error (value="onError") or a completion event (value="onComplete"). Errors and completion * notification are not forwarded by default. */ + @Metadata(label = "consumer", javaType = "String") public static final String REACTIVE_STREAMS_EVENT_TYPE = "CamelReactiveStreamsEventType"; - + @Metadata(description = "The callback.", javaType = "org.apache.camel.component.reactive.streams.api.DispatchCallback") public static final String REACTIVE_STREAMS_CALLBACK = "CamelReactiveStreamsCallback"; private ReactiveStreamsConstants() { diff --git a/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsEndpoint.java b/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsEndpoint.java index e865093b4a2..84c939c2a00 100644 --- a/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsEndpoint.java +++ b/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsEndpoint.java @@ -33,7 +33,7 @@ import org.apache.camel.support.DefaultEndpoint; */ @UriEndpoint(firstVersion = "2.19.0", scheme = "reactive-streams", title = "Reactive Streams", syntax = "reactive-streams:stream", - category = { Category.REACTIVE, Category.STREAMS }) + category = { Category.REACTIVE, Category.STREAMS }, headersClass = ReactiveStreamsConstants.class) @ManagedResource(description = "Managed ReactiveStreamsEndpoint") public class ReactiveStreamsEndpoint extends DefaultEndpoint {