Hi, I'm new to camel and I'm having trouble in creating a custom component. I cannot get it to run asynchronously. The consumer calls an external api using offsets and pushes the data to a seda queue. I have added a stack overflow question detailing my problem. Any advice/related docs is greatly appreciated.
SO question link : https://stackoverflow.com/questions/63858617/asynchronous-camel-component-dostop-called-immediately
Hi. I'm trying to use the Slack component as a consumer:
from("slack://testing?token=aAaaAAa1aaa1Aa1AAa1aaA1A")
.to("log:message")
and I'm getting an error:
[3] Exception in thread "main" org.apache.camel.FailedToStartRouteException: Failed to start route route2 because of null
[3] at org.apache.camel.impl.engine.RouteService.warmUp(RouteService.java:125)
[3] at org.apache.camel.impl.engine.InternalRouteStartupManager.doWarmUpRoutes(InternalRouteStartupManager.java:263)
[3] at org.apache.camel.impl.engine.InternalRouteStartupManager.safelyStartRouteServices(InternalRouteStartupManager.java:156)
[3] at org.apache.camel.impl.engine.InternalRouteStartupManager.doStartOrResumeRoutes(InternalRouteStartupManager.java:114)
[3] at org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:2809)
[3] at org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:2657)
[3] at org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:2620)
[3] at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
[3] at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2452)
[3] at org.apache.camel.k.main.ApplicationRuntime$MainAdapter.doStart(ApplicationRuntime.java:208)
[3] at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
[3] at org.apache.camel.main.MainSupport.run(MainSupport.java:60)
[3] at org.apache.camel.k.main.ApplicationRuntime.run(ApplicationRuntime.java:72)
[3] at org.apache.camel.k.main.Application.main(Application.java:42)
[3] Caused by: java.lang.NullPointerException
[3] at org.apache.camel.component.slack.SlackConsumer.getChannelId(SlackConsumer.java:137)
[3] at org.apache.camel.component.slack.SlackConsumer.<init>(SlackConsumer.java:54)
[3] at org.apache.camel.component.slack.SlackEndpoint.createConsumer(SlackEndpoint.java:84)
[3] at org.apache.camel.impl.engine.DefaultRoute.addServices(DefaultRoute.java:560)
[3] at org.apache.camel.impl.engine.DefaultRoute.onStartingServices(DefaultRoute.java:166)
[3] at org.apache.camel.impl.engine.RouteService.doWarmUp(RouteService.java:153)
[3] at org.apache.camel.impl.engine.RouteService.warmUp(RouteService.java:123)
[3] ... 13 more
What am I doing wrong? Thank you!
I have one question to JUnit 5 Tests and Apache Camel 3.4. I have a setup where i have split some two bigger routes into a piece of smaller route components. All within a SpringBoot 2.3 environment. Within the JUnit-5 tests i tried two setups. First i wrote a "adviceWith" helper class which sets all routes except of the current to mockEndpoints(). Second a setup where i used the Spring ComponentScan excludeFilters to exclude all route components except of the current.
Both are working, but i have a question. What is the prefered way. And i also have a mystic behavior within jenkins build. When i build my application locally it builds within 45 seconds with all the adviceWith Test cases. When i run it at jenkins it runs more than 1 hour. :-O
/metrics
endpoint, I would see something like: application_camel_exchange_processing_...{endpointName=kafka://topic1?brokers=localhost:9092?truststoreLocation=/var/ca.p12?truststoreKey=xks5/30223!da..
quarkus.camel.metrics.enable-exchange-event-notifier=false
). The exchange processing times contained all endpoint data. By doing so, I lose some processing metrics, but at least no passwords are exposed. @TheSasch Thanks for inputs - very appreciated!
if i read the documentation of the metrics component then it looks like any other datasink where you could put data to. it is possible that within the component there would be something like aggregation. but at the first look ist does not look other than any other consumer. with the from and the metrics-to i thought about that you could change everything you want. if i have such a problem i first introduce a processor to have a look which structure the body and the header data are and have a look if i could find my passwort. then a own solution would help or someone else wrote such a solution ,-)
While going to the outside get running. i thought about i wrote and i made a mistake. so sorry. documentation also says it is a produce and not a consumer. but it must have also consuming parts because of the behavior you wrote. so please have a look if you could get a execution endpoint within the producer to change some parts of the message.
Hello Everyone,
Good day
while working with camel 3.0.0, below piece of code was working
from("...")
.process(this::configureExchangeProperties)
...
.to("...")
private Processor configureExchangeProperties()
{
return x-> {
//.. some general header population
};
}
As mentioned in 3.0 to 3.1 upgradation guide, the supplier version of ProcessorDefintion has been removed,
and so we modified our code as below before upgrading to 3.1
from("...")
.process(this::configureExchangeProperties)
...
.to("...")
private void configureExchangeProperties(Exchange exchange)
{
//.. some general header population
}
Now, with just this change, or code started behaving weird. No output were generating. Also, nothing suspicious was found in logs
Could you please tell, what may be the probable reason ?
Hi, Can we download all blobs from Azure blob storage, by just specifying container name.
Something like in Amazon s3, where I specify bucket name and it picks all files in that bucket.
Currently, I see we need to specify blob name and it will download that file.
from("azure-storage-blob:/camelazure/container1?blobName=hello.txt&accessKey=yourAccessKey").
to("file://blobdirectory");
Probably there is no reconnection mechanism
As far as I undersstand from this folowing gode: https://is.gd/H3EcX2, there is some problems with single Connection. One for all events, so, maybe I'm not a really good programmer, but, can you please answer me, I really need an advice, if I try to rewrite my own pg_event and use PGPoolingDataSource for estabilishing connection will it be a good decision or not? Is there any troubles to use PGPoolingDataSource except of DataSource? Many thanks!