0 luồng phản ứng không hoạt động trong Red Hat Fuse 7.2 Tìm kiếm các tính năng / gói (tức là, công thức) để làm cho nó hoạt động

câu hỏi được tạo ra tại Wed, May 8, 2019 12:00 AM

Đã thử trải nghiệm với hỗ trợ Red Hat Fuse cho các luồng phản ứng.

Tôi đã "cài đặt" tính năng luồng phản ứng lạc đà, như trong ...

    osgi:install camel-reactive-streams

Sau đó, đã bao gồm phần phụ thuộc tương ứng trong tệp pom.xml của tôi

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

Đã thử một mã "RouteBuilder" thử nghiệm rất đơn giản bên dưới ...

...
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());
    }
}

Nhưng, khi triển khai - ngay lập tức nhận được dấu vết ngăn xếp có lỗi này ...

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

tính năng lạc đà được bật ...

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()>

cầu chì thư mục "triển khai" ...

$ 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. Bạn không nên tạo DefaultCamelContext mới vì điều đó không hoạt động trong OSGi. Bạn cần tạo nó thông qua kế hoạch chi tiết OSGi và sau đó có Java RouteBuilder nơi bạn có thể tham khảo bối cảnh lạc đà này từ kế hoạch chi tiết.
    2019-05-11 20: 29: 17Z
  2. giả sử bạn đang tham khảo tệp blueprint.xml (?) Tôi sẽ xem xét. Thx, Claus. : -)
    2019-05-12 05: 06: 05Z
0 Câu trả lời                              0                         
nguồn đặt đây