---
apiVersion: v1
kind: List
items:
- apiVersion: v1
kind: ConfigMap
metadata:
labels:
funktion.fabric8.io/kind: Connector
provider: fabric8
project: connector-direct-vm
version: 1.1.55
group: io.fabric8.funktion.connector
name: direct-vm
data:
deployment.yml: |
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
funktion.fabric8.io/kind: Subscription
connector: direct-vm
spec:
replicas: 1
template:
metadata:
labels:
funktion.fabric8.io/kind: Subscription
connector: direct-vm
spec:
containers:
- image: funktion/connector-direct-vm:1.1.55
name: connector
schema.yml: |
---
component:
kind: component
scheme: direct-vm
syntax: direct-vm:name
title: Direct VM
description: The direct-vm component provides direct synchronous call to another endpoint from any CamelContext in the same JVM.
label: core,endpoint
deprecated: false
async: true
javaType: org.apache.camel.component.directvm.DirectVmComponent
groupId: org.apache.camel
artifactId: camel-core
version: 2.18.1
componentProperties:
block:
kind: property
type: boolean
javaType: boolean
deprecated: false
secret: false
description: If sending a message to a direct endpoint which has no active consumer then we can tell the producer to block and wait for the consumer to become active.
order: 0
timeout:
kind: property
required: false
type: integer
javaType: long
deprecated: false
secret: false
defaultValue: "30000"
description: The timeout value to use if block is enabled.
order: 1
headerFilterStrategy:
kind: property
type: object
javaType: org.apache.camel.spi.HeaderFilterStrategy
deprecated: false
secret: false
description: 'Sets a HeaderFilterStrategy that will only be applied on producer
endpoints (on both directions: request and response). Default value: none.'
order: 2
propagateProperties:
kind: property
required: false
type: boolean
javaType: boolean
deprecated: false
secret: false
defaultValue: true
description: 'Whether to propagate or not properties from the producer side to
the consumer side and viceversa. Default value: true.'
order: 3
properties:
name:
kind: path
group: common
required: true
type: string
javaType: java.lang.String
deprecated: false
secret: false
description: Name of direct-vm endpoint
order: 0
bridgeErrorHandler:
kind: parameter
group: consumer
label: consumer
type: boolean
javaType: boolean
optionalPrefix: consumer.
deprecated: 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 message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN/ERROR level and ignored.
order: 1
exceptionHandler:
kind: parameter
group: consumer (advanced)
label: consumer,advanced
type: object
javaType: org.apache.camel.spi.ExceptionHandler
optionalPrefix: consumer.
deprecated: false
secret: false
description: To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.
order: 2
exchangePattern:
kind: parameter
group: consumer (advanced)
label: consumer,advanced
type: string
javaType: org.apache.camel.ExchangePattern
enum:
- InOnly
- RobustInOnly
- InOut
- InOptionalOut
- OutOnly
- RobustOutOnly
- OutIn
- OutOptionalIn
deprecated: false
secret: false
description: Sets the default exchange pattern when creating an exchange.
order: 3
block:
kind: parameter
group: producer
label: producer
type: boolean
javaType: boolean
deprecated: false
secret: false
defaultValue: false
description: If sending a message to a direct endpoint which has no active consumer then we can tell the producer to block and wait for the consumer to become active.
order: 4
failIfNoConsumers:
kind: parameter
group: producer
label: producer
type: boolean
javaType: boolean
deprecated: false
secret: false
defaultValue: false
description: Whether the producer should fail by throwing an exception when sending to a Direct-VM endpoint with no active consumers.
order: 5
timeout:
kind: parameter
group: producer
label: producer
type: integer
javaType: long
deprecated: false
secret: false
defaultValue: "30000"
description: The timeout value to use if block is enabled.
order: 6
headerFilterStrategy:
kind: parameter
group: producer (advanced)
label: producer,advanced
type: object
javaType: org.apache.camel.spi.HeaderFilterStrategy
deprecated: false
secret: false
description: 'Sets a HeaderFilterStrategy that will only be applied on producer
endpoints (on both directions: request and response). Default value: none.'
order: 7
propagateProperties:
kind: parameter
group: advanced
label: advanced
type: boolean
javaType: java.lang.Boolean
deprecated: false
secret: false
defaultValue: false
description: 'Whether to propagate or not properties from the producer side to
the consumer side and viceversa. Default value: true.'
order: 8
synchronous:
kind: parameter
group: advanced
label: advanced
type: boolean
javaType: boolean
deprecated: false
secret: false
defaultValue: false
description: Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
order: 9
documentation.adoc: "[[Direct-VM-DirectVMComponent]]\nDirect VM Component\n~~~~~~~~~~~~~~~~~~~\n\
\n*Available as of Camel 2.10*\n\nThe *direct-vm:* component provides direct,\
\ synchronous invocation of\nany consumers in the JVM when a producer sends\
\ a message exchange. +\n This endpoint can be used to connect existing routes\
\ in the same camel\ncontext, as well from other camel contexts in the *same*\
\ JVM.\n\nThis component differs from the link:direct.html[Direct] component\
\ in\nthat link:direct-vm.html[Direct-VM] supports communication across\nCamelContext\
\ instances - so you can use this mechanism to communicate\nacross web applications\
\ (provided that camel-core.jar is on the\nsystem/boot classpath).\n\nAt runtime\
\ you can swap in new consumers, by stopping the existing\nconsumer(s) and start\
\ new consumers. +\n But at any given time there can be at most only one active\
\ consumer for\na given endpoint.\n\nThis component allows also to connect routes\
\ deployed in different OSGI\nBundles as you can see here after. Even if they\
\ are running in different\nbundles, the camel routes will use +\n the same\
\ thread. That autorises to develop applications using\nTransactions - Tx.\n\
\nimage:direct-vm.data/camel-direct-vm.png[image]\n\n[[Direct-VM-URIformat]]\n\
URI format\n^^^^^^^^^^\n\n[source,java]\n------------------\ndirect-vm:someName\n\
------------------\n\nWhere *someName* can be any string to uniquely identify\
\ the endpoint\n\n[[Direct-VM-Options]]\nOptions\n^^^^^^^\n\n\n\n// component\
\ options: START\nThe Direct VM component supports 4 options which are listed\
\ below.\n\n\n\n{% raw %}\n[width=\"100%\",cols=\"2,1m,7\",options=\"header\"\
]\n|=======================================================================\n\
| Name | Java Type | Description\n| block | boolean | If sending a message to\
\ a direct endpoint which has no active consumer then we can tell the producer\
\ to block and wait for the consumer to become active.\n| timeout | long | The\
\ timeout value to use if block is enabled.\n| headerFilterStrategy | HeaderFilterStrategy\
\ | Sets a HeaderFilterStrategy that will only be applied on producer endpoints\
\ (on both directions: request and response). Default value: none.\n| propagateProperties\
\ | boolean | Whether to propagate or not properties from the producer side\
\ to the consumer side and viceversa. Default value: true.\n|=======================================================================\n\
{% endraw %}\n// component options: END\n\n\n\n\n// endpoint options: START\n\
The Direct VM component supports 10 endpoint options which are listed below:\n\
\n{% raw %}\n[width=\"100%\",cols=\"2,1,1m,1m,5\",options=\"header\"]\n|=======================================================================\n\
| Name | Group | Default | Java Type | Description\n| name | common | | String\
\ | *Required* Name of direct-vm endpoint\n| bridgeErrorHandler | consumer |\
\ false | boolean | 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 message and\
\ handled by the routing Error Handler. By default the consumer will use the\
\ org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be\
\ logged at WARN/ERROR level and ignored.\n| exceptionHandler | consumer (advanced)\
\ | | ExceptionHandler | To let the consumer use a custom ExceptionHandler.\
\ Notice if the option bridgeErrorHandler is enabled then this options is not\
\ in use. By default the consumer will deal with exceptions that will be logged\
\ at WARN/ERROR level and ignored.\n| exchangePattern | consumer (advanced)\
\ | | ExchangePattern | Sets the default exchange pattern when creating an\
\ exchange.\n| block | producer | false | boolean | If sending a message to\
\ a direct endpoint which has no active consumer then we can tell the producer\
\ to block and wait for the consumer to become active.\n| failIfNoConsumers\
\ | producer | false | boolean | Whether the producer should fail by throwing\
\ an exception when sending to a Direct-VM endpoint with no active consumers.\n\
| timeout | producer | 30000 | long | The timeout value to use if block is enabled.\n\
| headerFilterStrategy | producer (advanced) | | HeaderFilterStrategy | Sets\
\ a HeaderFilterStrategy that will only be applied on producer endpoints (on\
\ both directions: request and response). Default value: none.\n| propagateProperties\
\ | advanced | false | Boolean | Whether to propagate or not properties from\
\ the producer side to the consumer side and viceversa. Default value: true.\n\
| synchronous | advanced | false | boolean | Sets whether synchronous processing\
\ should be strictly used or Camel is allowed to use asynchronous processing\
\ (if supported).\n|=======================================================================\n\
{% endraw %}\n// endpoint options: END\n\n\n[[Direct-VM-Samples]]\nSamples\n\
^^^^^^^\n\nIn the route below we use the direct component to link the two routes\n\
together:\n\n[source,java]\n-------------------------------------------\nfrom(\"\
activemq:queue:order.in\")\n .to(\"bean:orderServer?method=validate\")\n\
\ .to(\"direct-vm:processOrder\");\n-------------------------------------------\n\
\nAnd now in another CamelContext, such as another OSGi bundle\n\n[source,java]\n\
-------------------------------------------\nfrom(\"direct-vm:processOrder\"\
)\n .to(\"bean:orderService?method=process\")\n .to(\"activemq:queue:order.out\"\
);\n-------------------------------------------\n\nAnd the sample using spring\
\ DSL:\n\n[source,xml]\n--------------------------------------------------\n\
\ \n \n \n \n \n\n \n \
\ \n \n \n \n--------------------------------------------------\n\
\n[[Direct-VM-SeeAlso]]\nSee Also\n^^^^^^^^\n\n* link:configuring-camel.html[Configuring\
\ Camel]\n* link:component.html[Component]\n* link:endpoint.html[Endpoint]\n\
* link:getting-started.html[Getting Started]\n\n* link:direct.html[Direct]\n\
* link:seda.html[SEDA]\n* link:vm.html[VM]\n\n"