0 Вопрос: реактивные потоки не работают в Red Hat Fuse 7.2… -Поиск функций / комплектов (т. е. рецепт), чтобы заставить его работать

вопрос создан в Wed, May 8, 2019 12:00 AM

Пытался поэкспериментировать с поддержкой Red Hat Fuse для реактивных потоков.

Я "установил" функцию верблюд-реактивных потоков, как в ...

    osgi:install camel-reactive-streams

Затем включил соответствующую зависимость в мой pom.xml

    ...
    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-reactive-streams</artifactId>
        <version>2.21.0.fuse-720050-redhat-00001</version>
        <scope>provided</scope>
    </dependency>
    ...

Пробовал очень простой экспериментальный код "RouteBuilder" ниже ...

...
import org.apache.camel.component.reactive.streams.api.CamelReactiveStreamsService;
import org.apache.camel.component.reactive.streams.engine.DefaultCamelReactiveStreamsService;
...

public class CamelRoute extends RouteBuilder {
    @Override
    public void configure() throws Exception {
        CamelReactiveStreamsService crss = CamelReactiveStreams.get(new DefaultCamelContext());
    }
}

Но при развертывании - немедленно получите трассировку стека с этой ошибкой ...

Caused by: java.lang.IllegalArgumentException: 
           Did not find component given by the name: reactive-streams

функции верблюда включены ...

karaf@root()> features:list | grep " \| camel" | grep " \| Started"
xml-specs-api                            | 2.9.0                           |          | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel                                    | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-core                               | 2.21.0.fuse-720050-redhat-00001 |          | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-blueprint                          | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-spring                             | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-cdi                                | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-csv                                | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-cxf                                | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-disruptor                          | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-exec                               | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-ftp                                | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-http4                              | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-jackson                            | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-jacksonxml                         | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-jasypt                             | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-jaxb                               | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-jdbc                               | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-jms                                | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-jmx                                | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-jsonpath                           | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-mail                               | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-netty4                             | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-netty4-http                        | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-paxlogging                         | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-reactive-streams                   | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-reactor                            | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-rmi                                | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-saxon                              | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-script                             | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-snmp                               | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-stream                             | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
camel-xstream                            | 2.21.0.fuse-720050-redhat-00001 | x        | Started     | camel-2.21.0.fuse-720050-redhat-00001         |
karaf@root()>

папка fuse "deploy" ...

$ ls -l
total 15960
-rwxrwx---+ 1 sagerlaptop None  792825 May  3 12:56 bcpkix-jdk15on.jar
-rwxrwx---+ 1 sagerlaptop None 4092400 May  3 12:56 bcprov-jdk15on.jar
-rwxrwx---+ 1 sagerlaptop None   12023 May  9 10:48 camelfuseDSL_MQ-1.0.jar
-rwxrwx---+ 1 sagerlaptop None 8277877 May  3 12:56 com.ibm.mq.allclient.jar
-rwxrwx---+ 1 sagerlaptop None   43703 May  3 12:56 com.ibm.mq.traceControl.jar
-rwxrwx---+ 1 sagerlaptop None  610259 May  6 13:32 commons-collections4-4.0.jar
-rwxrwx---+ 1 sagerlaptop None   22769 May  3 12:56 fscontext.jar
-rwxrwx---+ 1 sagerlaptop None   58349 May  3 12:56 jms.jar
-rwxrwx---+ 1 sagerlaptop None   77116 May  3 12:56 providerutil.jar
-rwxrwx---+ 1 sagerlaptop None 2340461 May  6 17:27 rxjava-2.2.8.jar
    
0
  1. Не следует создавать новый DefaultCamelContext, так как он не работает в OSGi. Вам нужно создать его с помощью OSGi blueprint, а затем иметь Java RouteBuilder, где вы можете ссылаться на этот верблюжий контекст, взятый из blueprint.
    2019-05-11 20: 29: 17Z
  2. предположим, что вы ссылаетесь на файл blueprint.xml (?) Я посмотрю. спасибо, Клаус. : -)
    2019-05-12 05: 06: 05Z
0 ответов                              0                         
источник размещен Вот