You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2023/03/11 06:44:00 UTC

[jira] [Updated] (CAMEL-19133) camel-zookeeper - Zookeeper's service registration and discovery is not working with serialized

     [ https://issues.apache.org/jira/browse/CAMEL-19133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-19133:
--------------------------------
    Summary: camel-zookeeper - Zookeeper's service registration and discovery is not working with serialized  (was: Zookeeper's service registration and discovery is not working properly)

> camel-zookeeper - Zookeeper's service registration and discovery is not working with serialized
> -----------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-19133
>                 URL: https://issues.apache.org/jira/browse/CAMEL-19133
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-zookeeper
>    Affects Versions: 3.20.2
>         Environment: jdk17+springboot2.7.9+camel3.20.2
>            Reporter: geyipeng
>            Priority: Minor
>             Fix For: 3.20.3, 3.21.0, 4.0-M3, 4.0
>
>         Attachments: changeMetaData.patch, image-2023-03-11-09-09-06-741.png, image-2023-03-11-09-11-24-022.png
>
>
> {{{*}my code{*}:}}
> {{@Component}}
> {{public class MyRouter extends RouteBuilder {}}
> {{@Value("${server.port}")}}
> {{String port;}}
> {{@Override}}
> {{public void configure() throws Exception {}}
> {{getCamelContext().addRoutePolicyFactory(new ServiceRegistrationRoutePolicyFactory());}}
> {{from("direct:1")}}
> {{.routeProperty(ServiceDefinition.SERVICE_META_NAME, "addHello")}}
> {{.routeProperty(ServiceDefinition.SERVICE_META_ID, "my-id" + port)}}
> {{.routeProperty(ServiceDefinition.SERVICE_META_PORT, port)}}
> {{.process(new Processor() {}}
> {{@Override}}
> {{public void process(Exchange exchange) throws Exception {}}
> {{exchange.getMessage().setBody(exchange.getMessage().getBody() + "hello");}}
> {{}}}
> {{})}}
> {{.log("${body}");}}
> {{from("timer://foo?fixedRate=true&period=1000")}}
> {{.serviceCall()}}
> {{.name("addHello")}}
> {{.zookeeperServiceDiscovery()}}
> {{.nodes("127.0.0.1")}}
> {{.basePath("/config")}}
> {{.end()}}
> {{.log("${body}");}}
> {{}}}
> {{}}}
> {{issue:}}
> {{The service registration function of zookeeper will carry type information during serialization}}
> {{!image-2023-03-11-09-09-06-741.png! }}
> {{and an error will be reported due to different MetaData during deserialization}}
> {{!image-2023-03-11-09-11-24-022.png! }}
> {{solution:}}
> {{The internal class MetaData in the ZooKeeperServiceDiscovery and ZooKeeperServiceRegistry needs to be extracted}}
> {{This is my modified patch in the camel-3.20.2 revision of the camel-zookeeper project}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)