405 lines
20 KiB
JSON
405 lines
20 KiB
JSON
|
|
{
|
||
|
|
"component": {
|
||
|
|
"kind": "component",
|
||
|
|
"name": "mock",
|
||
|
|
"title": "Mock",
|
||
|
|
"description": "Test routes and mediation rules using mocks.",
|
||
|
|
"deprecated": false,
|
||
|
|
"firstVersion": "1.0.0",
|
||
|
|
"label": "core,testing",
|
||
|
|
"javaType": "org.apache.camel.component.mock.MockComponent",
|
||
|
|
"supportLevel": "Stable",
|
||
|
|
"nativeSupported": true,
|
||
|
|
"metadata": {
|
||
|
|
"quarkusVersion": "3.36.0",
|
||
|
|
"camelArtifact": "org.apache.camel:camel-mock",
|
||
|
|
"camelVersion": "4.20.0"
|
||
|
|
},
|
||
|
|
"groupId": "org.apache.camel.quarkus",
|
||
|
|
"artifactId": "camel-quarkus-mock",
|
||
|
|
"version": "4.20.0 (CEQ 3.36.0)",
|
||
|
|
"scheme": "mock",
|
||
|
|
"extendsScheme": "",
|
||
|
|
"syntax": "mock:name",
|
||
|
|
"async": false,
|
||
|
|
"api": false,
|
||
|
|
"consumerOnly": false,
|
||
|
|
"producerOnly": true,
|
||
|
|
"lenientProperties": true,
|
||
|
|
"browsable": true,
|
||
|
|
"remote": false
|
||
|
|
},
|
||
|
|
"componentProperties": {
|
||
|
|
"lazyStartProducer": {
|
||
|
|
"index": 0,
|
||
|
|
"kind": "property",
|
||
|
|
"displayName": "Lazy Start Producer",
|
||
|
|
"group": "producer",
|
||
|
|
"label": "producer",
|
||
|
|
"required": false,
|
||
|
|
"type": "boolean",
|
||
|
|
"javaType": "boolean",
|
||
|
|
"deprecated": false,
|
||
|
|
"autowired": false,
|
||
|
|
"secret": false,
|
||
|
|
"defaultValue": false,
|
||
|
|
"description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing."
|
||
|
|
},
|
||
|
|
"log": {
|
||
|
|
"index": 1,
|
||
|
|
"kind": "property",
|
||
|
|
"displayName": "Log",
|
||
|
|
"group": "producer",
|
||
|
|
"label": "producer",
|
||
|
|
"required": false,
|
||
|
|
"type": "boolean",
|
||
|
|
"javaType": "boolean",
|
||
|
|
"deprecated": false,
|
||
|
|
"autowired": false,
|
||
|
|
"secret": false,
|
||
|
|
"defaultValue": false,
|
||
|
|
"description": "To turn on logging when the mock receives an incoming message. This will log only one time at INFO level for the incoming message. For more detailed logging, then set the logger to DEBUG level for the org.apache.camel.component.mock.MockEndpoint class."
|
||
|
|
},
|
||
|
|
"autowiredEnabled": {
|
||
|
|
"index": 2,
|
||
|
|
"kind": "property",
|
||
|
|
"displayName": "Autowired Enabled",
|
||
|
|
"group": "advanced",
|
||
|
|
"label": "advanced",
|
||
|
|
"required": false,
|
||
|
|
"type": "boolean",
|
||
|
|
"javaType": "boolean",
|
||
|
|
"deprecated": false,
|
||
|
|
"autowired": false,
|
||
|
|
"secret": false,
|
||
|
|
"defaultValue": true,
|
||
|
|
"description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc."
|
||
|
|
},
|
||
|
|
"exchangeFormatter": {
|
||
|
|
"index": 3,
|
||
|
|
"kind": "property",
|
||
|
|
"displayName": "Exchange Formatter",
|
||
|
|
"group": "advanced",
|
||
|
|
"label": "advanced",
|
||
|
|
"required": false,
|
||
|
|
"type": "object",
|
||
|
|
"javaType": "org.apache.camel.spi.ExchangeFormatter",
|
||
|
|
"deprecated": false,
|
||
|
|
"autowired": true,
|
||
|
|
"secret": false,
|
||
|
|
"description": "To use a custom ExchangeFormatter to format the Exchange into a String suitable for logging."
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"properties": {
|
||
|
|
"name": {
|
||
|
|
"index": 0,
|
||
|
|
"kind": "path",
|
||
|
|
"displayName": "Name",
|
||
|
|
"group": "producer",
|
||
|
|
"label": "",
|
||
|
|
"required": true,
|
||
|
|
"type": "string",
|
||
|
|
"javaType": "java.lang.String",
|
||
|
|
"deprecated": false,
|
||
|
|
"deprecationNote": "",
|
||
|
|
"autowired": false,
|
||
|
|
"secret": false,
|
||
|
|
"description": "Name of mock endpoint"
|
||
|
|
},
|
||
|
|
"assertPeriod": {
|
||
|
|
"index": 1,
|
||
|
|
"kind": "parameter",
|
||
|
|
"displayName": "Assert Period",
|
||
|
|
"group": "producer",
|
||
|
|
"label": "producer",
|
||
|
|
"required": false,
|
||
|
|
"type": "duration",
|
||
|
|
"javaType": "long",
|
||
|
|
"deprecated": false,
|
||
|
|
"autowired": false,
|
||
|
|
"secret": false,
|
||
|
|
"description": "Sets a grace period after which the mock will re-assert to ensure the preliminary assertion is still valid. This is used, for example, to assert that exactly a number of messages arrive. For example, if the expected count was set to 5, then the assertion is satisfied when five or more messages arrive. To ensure that exactly 5 messages arrive, then you would need to wait a little period to ensure no further message arrives. This is what you can use this method for. By default, this period is disabled."
|
||
|
|
},
|
||
|
|
"expectedCount": {
|
||
|
|
"index": 2,
|
||
|
|
"kind": "parameter",
|
||
|
|
"displayName": "Expected Count",
|
||
|
|
"group": "producer",
|
||
|
|
"label": "producer",
|
||
|
|
"required": false,
|
||
|
|
"type": "integer",
|
||
|
|
"javaType": "int",
|
||
|
|
"deprecated": false,
|
||
|
|
"autowired": false,
|
||
|
|
"secret": false,
|
||
|
|
"defaultValue": -1,
|
||
|
|
"description": "Specifies the expected number of message exchanges that should be received by this mock. Beware: If you want to expect that 0 messages, then take extra care, as 0 matches when the tests starts, so you need to set a assert period time to let the test run for a while to make sure there are still no messages arrived; for that use the assertPeriod option. If you want to assert that exactly nth message arrives to this mock, then see also the assertPeriod option for further details."
|
||
|
|
},
|
||
|
|
"copyOnExchange": {
|
||
|
|
"index": 3,
|
||
|
|
"kind": "parameter",
|
||
|
|
"displayName": "Copy On Exchange",
|
||
|
|
"group": "producer (advanced)",
|
||
|
|
"label": "producer,advanced",
|
||
|
|
"required": false,
|
||
|
|
"type": "boolean",
|
||
|
|
"javaType": "boolean",
|
||
|
|
"deprecated": false,
|
||
|
|
"autowired": false,
|
||
|
|
"secret": false,
|
||
|
|
"defaultValue": true,
|
||
|
|
"description": "Sets whether to make a deep copy of the incoming Exchange when received at this mock endpoint."
|
||
|
|
},
|
||
|
|
"failFast": {
|
||
|
|
"index": 4,
|
||
|
|
"kind": "parameter",
|
||
|
|
"displayName": "Fail Fast",
|
||
|
|
"group": "producer (advanced)",
|
||
|
|
"label": "producer,advanced",
|
||
|
|
"required": false,
|
||
|
|
"type": "boolean",
|
||
|
|
"javaType": "boolean",
|
||
|
|
"deprecated": false,
|
||
|
|
"autowired": false,
|
||
|
|
"secret": false,
|
||
|
|
"defaultValue": true,
|
||
|
|
"description": "Sets whether assertIsSatisfied() should fail fast at the first detected failed expectation while it may otherwise wait for all expected messages to arrive before performing expectations verifications. Is by default true. Set to false to use behavior as in Camel 2.x."
|
||
|
|
},
|
||
|
|
"lazyStartProducer": {
|
||
|
|
"index": 5,
|
||
|
|
"kind": "parameter",
|
||
|
|
"displayName": "Lazy Start Producer",
|
||
|
|
"group": "producer (advanced)",
|
||
|
|
"label": "producer,advanced",
|
||
|
|
"required": false,
|
||
|
|
"type": "boolean",
|
||
|
|
"javaType": "boolean",
|
||
|
|
"deprecated": false,
|
||
|
|
"autowired": false,
|
||
|
|
"secret": false,
|
||
|
|
"defaultValue": false,
|
||
|
|
"description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing."
|
||
|
|
},
|
||
|
|
"log": {
|
||
|
|
"index": 6,
|
||
|
|
"kind": "parameter",
|
||
|
|
"displayName": "Log",
|
||
|
|
"group": "producer (advanced)",
|
||
|
|
"label": "producer,advanced",
|
||
|
|
"required": false,
|
||
|
|
"type": "boolean",
|
||
|
|
"javaType": "boolean",
|
||
|
|
"deprecated": false,
|
||
|
|
"autowired": false,
|
||
|
|
"secret": false,
|
||
|
|
"defaultValue": false,
|
||
|
|
"description": "To turn on logging when the mock receives an incoming message. This will log only one time at INFO level for the incoming message. For more detailed logging, then set the logger to DEBUG level for the org.apache.camel.component.mock.MockEndpoint class."
|
||
|
|
},
|
||
|
|
"reportGroup": {
|
||
|
|
"index": 7,
|
||
|
|
"kind": "parameter",
|
||
|
|
"displayName": "Report Group",
|
||
|
|
"group": "producer (advanced)",
|
||
|
|
"label": "producer,advanced",
|
||
|
|
"required": false,
|
||
|
|
"type": "integer",
|
||
|
|
"javaType": "int",
|
||
|
|
"deprecated": false,
|
||
|
|
"autowired": false,
|
||
|
|
"secret": false,
|
||
|
|
"description": "A number that is used to turn on throughput logging based on groups of the size."
|
||
|
|
},
|
||
|
|
"resultMinimumWaitTime": {
|
||
|
|
"index": 8,
|
||
|
|
"kind": "parameter",
|
||
|
|
"displayName": "Result Minimum Wait Time",
|
||
|
|
"group": "producer (advanced)",
|
||
|
|
"label": "producer,advanced",
|
||
|
|
"required": false,
|
||
|
|
"type": "duration",
|
||
|
|
"javaType": "long",
|
||
|
|
"deprecated": false,
|
||
|
|
"autowired": false,
|
||
|
|
"secret": false,
|
||
|
|
"description": "Sets the minimum expected amount of time the assertIsSatisfied() will wait on a latch until it is satisfied"
|
||
|
|
},
|
||
|
|
"resultWaitTime": {
|
||
|
|
"index": 9,
|
||
|
|
"kind": "parameter",
|
||
|
|
"displayName": "Result Wait Time",
|
||
|
|
"group": "producer (advanced)",
|
||
|
|
"label": "producer,advanced",
|
||
|
|
"required": false,
|
||
|
|
"type": "duration",
|
||
|
|
"javaType": "long",
|
||
|
|
"deprecated": false,
|
||
|
|
"autowired": false,
|
||
|
|
"secret": false,
|
||
|
|
"description": "Sets the maximum amount of time the assertIsSatisfied() will wait on a latch until it is satisfied"
|
||
|
|
},
|
||
|
|
"retainFirst": {
|
||
|
|
"index": 10,
|
||
|
|
"kind": "parameter",
|
||
|
|
"displayName": "Retain First",
|
||
|
|
"group": "producer (advanced)",
|
||
|
|
"label": "producer,advanced",
|
||
|
|
"required": false,
|
||
|
|
"type": "integer",
|
||
|
|
"javaType": "int",
|
||
|
|
"deprecated": false,
|
||
|
|
"autowired": false,
|
||
|
|
"secret": false,
|
||
|
|
"defaultValue": -1,
|
||
|
|
"description": "Specifies to only retain the first nth number of received Exchanges. This is used when testing with big data, to reduce memory consumption by not storing copies of every Exchange this mock endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still return the actual number of received message. For example if we have received 5000 messages and have configured to only retain the first 10 Exchanges, then the getReceivedCounter() will still return 5000 but there is only the first 10 Exchanges in the getExchanges() and getReceivedExchanges() methods. When using this method, then some of the other expectation methods is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the first number of bodies received. You can configure both retainFirst and retainLast options, to limit both the first and last received."
|
||
|
|
},
|
||
|
|
"retainLast": {
|
||
|
|
"index": 11,
|
||
|
|
"kind": "parameter",
|
||
|
|
"displayName": "Retain Last",
|
||
|
|
"group": "producer (advanced)",
|
||
|
|
"label": "producer,advanced",
|
||
|
|
"required": false,
|
||
|
|
"type": "integer",
|
||
|
|
"javaType": "int",
|
||
|
|
"deprecated": false,
|
||
|
|
"autowired": false,
|
||
|
|
"secret": false,
|
||
|
|
"defaultValue": -1,
|
||
|
|
"description": "Specifies to only retain the last nth number of received Exchanges. This is used when testing with big data, to reduce memory consumption by not storing copies of every Exchange this mock endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still return the actual number of received message. For example if we have received 5000 messages and have configured to only retain the last 20 Exchanges, then the getReceivedCounter() will still return 5000 but there is only the last 20 Exchanges in the getExchanges() and getReceivedExchanges() methods. When using this method, then some of the other expectation methods is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the first number of bodies received. You can configure both retainFirst and retainLast options, to limit both the first and last received."
|
||
|
|
},
|
||
|
|
"sleepForEmptyTest": {
|
||
|
|
"index": 12,
|
||
|
|
"kind": "parameter",
|
||
|
|
"displayName": "Sleep For Empty Test",
|
||
|
|
"group": "producer (advanced)",
|
||
|
|
"label": "producer,advanced",
|
||
|
|
"required": false,
|
||
|
|
"type": "duration",
|
||
|
|
"javaType": "long",
|
||
|
|
"deprecated": false,
|
||
|
|
"autowired": false,
|
||
|
|
"secret": false,
|
||
|
|
"description": "Allows a sleep to be specified to wait to check that this mock really is empty when expectedMessageCount(int) is called with zero value"
|
||
|
|
},
|
||
|
|
"browseLimit": {
|
||
|
|
"index": 13,
|
||
|
|
"kind": "parameter",
|
||
|
|
"displayName": "Browse Limit",
|
||
|
|
"group": "advanced",
|
||
|
|
"label": "advanced",
|
||
|
|
"required": false,
|
||
|
|
"type": "integer",
|
||
|
|
"javaType": "int",
|
||
|
|
"deprecated": false,
|
||
|
|
"autowired": false,
|
||
|
|
"secret": false,
|
||
|
|
"defaultValue": 100,
|
||
|
|
"description": "Maximum number of messages to keep in memory available for browsing. Use 0 for unlimited."
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"propertiesSchema": {
|
||
|
|
"properties": {
|
||
|
|
"name": {
|
||
|
|
"title": "Name",
|
||
|
|
"description": "Name of mock endpoint",
|
||
|
|
"type": "string",
|
||
|
|
"$comment": "group:producer"
|
||
|
|
},
|
||
|
|
"assertPeriod": {
|
||
|
|
"title": "Assert Period",
|
||
|
|
"description": "Sets a grace period after which the mock will re-assert to ensure the preliminary assertion is still valid. This is used, for example, to assert that exactly a number of messages arrive. For example, if the expected count was set to 5, then the assertion is satisfied when five or more messages arrive. To ensure that exactly 5 messages arrive, then you would need to wait a little period to ensure no further message arrives. This is what you can use this method for. By default, this period is disabled.",
|
||
|
|
"type": "string",
|
||
|
|
"$comment": "group:producer",
|
||
|
|
"format": "duration"
|
||
|
|
},
|
||
|
|
"expectedCount": {
|
||
|
|
"title": "Expected Count",
|
||
|
|
"description": "Specifies the expected number of message exchanges that should be received by this mock. Beware: If you want to expect that 0 messages, then take extra care, as 0 matches when the tests starts, so you need to set a assert period time to let the test run for a while to make sure there are still no messages arrived; for that use the assertPeriod option. If you want to assert that exactly nth message arrives to this mock, then see also the assertPeriod option for further details.",
|
||
|
|
"type": "integer",
|
||
|
|
"$comment": "group:producer",
|
||
|
|
"default": -1
|
||
|
|
},
|
||
|
|
"copyOnExchange": {
|
||
|
|
"title": "Copy On Exchange",
|
||
|
|
"description": "Sets whether to make a deep copy of the incoming Exchange when received at this mock endpoint.",
|
||
|
|
"type": "boolean",
|
||
|
|
"$comment": "group:producer (advanced)",
|
||
|
|
"default": true
|
||
|
|
},
|
||
|
|
"failFast": {
|
||
|
|
"title": "Fail Fast",
|
||
|
|
"description": "Sets whether assertIsSatisfied() should fail fast at the first detected failed expectation while it may otherwise wait for all expected messages to arrive before performing expectations verifications. Is by default true. Set to false to use behavior as in Camel 2.x.",
|
||
|
|
"type": "boolean",
|
||
|
|
"$comment": "group:producer (advanced)",
|
||
|
|
"default": true
|
||
|
|
},
|
||
|
|
"lazyStartProducer": {
|
||
|
|
"title": "Lazy Start Producer",
|
||
|
|
"description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing.",
|
||
|
|
"type": "boolean",
|
||
|
|
"$comment": "group:producer (advanced)",
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"log": {
|
||
|
|
"title": "Log",
|
||
|
|
"description": "To turn on logging when the mock receives an incoming message. This will log only one time at INFO level for the incoming message. For more detailed logging, then set the logger to DEBUG level for the org.apache.camel.component.mock.MockEndpoint class.",
|
||
|
|
"type": "boolean",
|
||
|
|
"$comment": "group:producer (advanced)",
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"reportGroup": {
|
||
|
|
"title": "Report Group",
|
||
|
|
"description": "A number that is used to turn on throughput logging based on groups of the size.",
|
||
|
|
"type": "integer",
|
||
|
|
"$comment": "group:producer (advanced)"
|
||
|
|
},
|
||
|
|
"resultMinimumWaitTime": {
|
||
|
|
"title": "Result Minimum Wait Time",
|
||
|
|
"description": "Sets the minimum expected amount of time the assertIsSatisfied() will wait on a latch until it is satisfied",
|
||
|
|
"type": "string",
|
||
|
|
"$comment": "group:producer (advanced)",
|
||
|
|
"format": "duration"
|
||
|
|
},
|
||
|
|
"resultWaitTime": {
|
||
|
|
"title": "Result Wait Time",
|
||
|
|
"description": "Sets the maximum amount of time the assertIsSatisfied() will wait on a latch until it is satisfied",
|
||
|
|
"type": "string",
|
||
|
|
"$comment": "group:producer (advanced)",
|
||
|
|
"format": "duration"
|
||
|
|
},
|
||
|
|
"retainFirst": {
|
||
|
|
"title": "Retain First",
|
||
|
|
"description": "Specifies to only retain the first nth number of received Exchanges. This is used when testing with big data, to reduce memory consumption by not storing copies of every Exchange this mock endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still return the actual number of received message. For example if we have received 5000 messages and have configured to only retain the first 10 Exchanges, then the getReceivedCounter() will still return 5000 but there is only the first 10 Exchanges in the getExchanges() and getReceivedExchanges() methods. When using this method, then some of the other expectation methods is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the first number of bodies received. You can configure both retainFirst and retainLast options, to limit both the first and last received.",
|
||
|
|
"type": "integer",
|
||
|
|
"$comment": "group:producer (advanced)",
|
||
|
|
"default": -1
|
||
|
|
},
|
||
|
|
"retainLast": {
|
||
|
|
"title": "Retain Last",
|
||
|
|
"description": "Specifies to only retain the last nth number of received Exchanges. This is used when testing with big data, to reduce memory consumption by not storing copies of every Exchange this mock endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still return the actual number of received message. For example if we have received 5000 messages and have configured to only retain the last 20 Exchanges, then the getReceivedCounter() will still return 5000 but there is only the last 20 Exchanges in the getExchanges() and getReceivedExchanges() methods. When using this method, then some of the other expectation methods is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the first number of bodies received. You can configure both retainFirst and retainLast options, to limit both the first and last received.",
|
||
|
|
"type": "integer",
|
||
|
|
"$comment": "group:producer (advanced)",
|
||
|
|
"default": -1
|
||
|
|
},
|
||
|
|
"sleepForEmptyTest": {
|
||
|
|
"title": "Sleep For Empty Test",
|
||
|
|
"description": "Allows a sleep to be specified to wait to check that this mock really is empty when expectedMessageCount(int) is called with zero value",
|
||
|
|
"type": "string",
|
||
|
|
"$comment": "group:producer (advanced)",
|
||
|
|
"format": "duration"
|
||
|
|
},
|
||
|
|
"browseLimit": {
|
||
|
|
"title": "Browse Limit",
|
||
|
|
"description": "Maximum number of messages to keep in memory available for browsing. Use 0 for unlimited.",
|
||
|
|
"type": "integer",
|
||
|
|
"$comment": "group:advanced",
|
||
|
|
"default": 100
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||
|
|
"type": "object",
|
||
|
|
"required": [
|
||
|
|
"name"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|